6077 Commits

Author SHA1 Message Date
Luke Towers
c2ad6b309f Code style fix and replaced use of {% filter %} in the demo theme 2022-02-18 09:50:18 -06:00
Luke Towers
c713c7d8d5 Polyfill {% filter %} token removed in Twig v3 2022-02-18 09:33:22 -06:00
Ben Thomson
f4efb897ac
Retain spaceless tag in Twig (#456)
Keeps the {% spaceless %} ... {% endspaceless %} tag available in Twig 3.x for Winter CMS backwards compatibility.

While it was deprecated and removed in Twig 3.x, it appears to work still, but may need some more testing.
2022-02-18 09:25:12 -06:00
Luke Towers
a8160d017e Fix Twig type hints 2022-02-18 09:14:32 -06:00
Luke Towers
895c032196 loadTemplate($name) -> load($name)
Required as of Twig v3
2022-02-18 09:13:53 -06:00
Luke Towers
77ef563f43 Refactor CMS Twig environment.
Credit to @SeriousKen for the original work in https://github.com/octobercms/october/pull/3575
2022-02-18 01:44:36 -06:00
Luke Towers
3fec059a74 Initial work on refactoring the Twig usage to use separate environments as required 2022-02-17 21:28:37 -06:00
Luke Towers
79aaaeee4d Only normalize plaintext files when generating FileManifests 2022-02-17 07:51:18 -06:00
Luke Towers
a9f7f2cd99 Bump phpcs dependency to support // phpcs: comment syntax 2022-02-16 15:36:13 -06:00
Luke Towers
421d7ae43e Remove debugging code 2022-02-16 02:16:36 -06:00
Luke Towers
7f6fcb59be Don't defer registering module routes
Related to 290303c740
2022-02-16 02:03:59 -06:00
Luke Towers
8a79307ef6 Run workflows on wip/1.2 2022-02-15 13:30:18 -06:00
Luke Towers
be45c63d2c Code style fix 2022-02-15 13:24:16 -06:00
Luke Towers
12a9182537 Merge branch 'develop' into wip/1.2
# Conflicts:
#	modules/system/ServiceProvider.php
2022-02-15 13:21:29 -06:00
Luke Towers
261a6272bf Don't load plugin routes if routes are cached 2022-02-15 11:58:12 -06:00
Luke Towers
cd7777294d Initial support for command autocompletion
Run `artisan completion --help` for instructions on setting up command autocompletion for your terminal.
2022-02-15 11:57:54 -06:00
Luke Towers
869a718fee
Merge pull request #401 from wintercms/wip/snowboard
[1.1.8] Implement an opt-in improved JS framework (Snowboard). Documented by https://github.com/wintercms/docs/pull/45
2022-02-15 10:43:29 -06:00
Luke Towers
5ead84c7a1
Merge pull request #444 from wintercms/wip/mix-changes
Add automatic package registration and improved installation to Laravel Mix support
2022-02-15 02:46:36 -06:00
Luke Towers
bb58ad97a0 Remove server.php
No longer needed as of 94e846b4db
2022-02-15 02:31:06 -06:00
Luke Towers
4e856859a2 Merge branch 'wip/1.2' of github.com:wintercms/winter into wip/1.2 2022-02-15 02:16:53 -06:00
Luke Towers
d61ac9d9fe Move CMS console commands into the CMS module
Moved the following:
- \System\Console\ThemeInstall -> \Cms\Console\ThemeInstall
- \System\Console\ThemeRemove -> \Cms\Console\ThemeRemove
- \System\Console\ThemeList -> \Cms\Console\ThemeList
- \System\Console\ThemeUse -> \Cms\Console\ThemeUse
- \System\Console\ThemeSync -> \Cms\Console\ThemeSync
2022-02-15 02:16:34 -06:00
Ben Thomson
b7c92ffdd3
Apply correct default for cookie.secure config 2022-02-15 12:59:31 +08:00
Luke Towers
301ffd1985 Update testing dependencies to match Laravel 9 2022-02-14 16:13:56 -06:00
Luke Towers
589ff4332e Cleanup console command return types 2022-02-14 15:15:14 -06:00
Luke Towers
f6510979cc Sync config defaults with Laravel 9.x skeleton
Changed from Laravel defaults:
- Array configuration items should have their assigner operators aligned and keys should be sorted alphabetically

Removed:
- database.fetch: Removed from the default in Laravel 5.4 (and originally changed to FETCH_OBJ in 5.3) see 770c41552f & https://github.com/laravel/laravel/pull/3815
- filesystems.cloud: Removed from the default in Laravel 8.4.4 since it's not good practice to use Storage::cloud(), should use explicit disk configurations instead. See 82213fbf40
- services.mandrill: No longer officially supported since < Laravel 6.x; can use the SMTP driver instead
- services.sparkport: No longer officially supported in Laravel since < Laravel 6.x or Winter since v1.2 (third party package to reprovide driver is available but config should be manually added when desired.)
- services.stripe: Removed in Laravel v5.8.35, see 83d2ecc0e9

Explicitly not synced:
- Some calls to env(), will be addressed by future work on the ConfigWriter
- auth.php, will be addressed by future work to bring the Winter auth system more in line with the Laravel one
- cors.php, not implemented by default in Winter at the moment, plugins are available
- filesystems.php: storage.links & storage.disks.public not included because storage:link is not supported by Winter yet and further thought is needed for its inclusion.
- mail.php: markdown - Laravel's markdown mail functionality not verified to work within Winter which has it's own set of email templating logic. May be investigated and included later down the road if desired.
- sanctum.php: Laravel Sanctum is an authentication system for Laravel that is completely untested with Winter. Can be evaluated at a later date for inclusion.
2022-02-14 14:42:24 -06:00
Luke Towers
a2276012aa
Update modules/system/classes/MixAssets.php
Co-authored-by: Ben Thomson <git@alfreido.com>
2022-02-14 07:47:04 -06:00
Luke Towers
b532c66661 Add and comment out missing Js facade
Laravel 8.x added a JS helper to turn PHP data into JS data (see https://github.com/laravel/framework/pull/39389) however I'm not convinced of it's utility over json_encode so this is commented out by default for now.
2022-02-13 22:51:49 -06:00
Luke Towers
58b5b57fed Bring the default aliases up to date with Laravel 9
Added:
- Arr: No facade required, also wasn't being registered for Laravel or Winter, using Winter's override
- Str: No facade required, using Winter's override
- Broadcast: Added in Laravel 5.4 (52f0196fd3)
- Date: Added in Laravel 8.4.14 (89b15441a9)
- Notification: Added in Laravel 5.3 (e6cc60349d)
- RateLimiter: Added in Laravel 8.5.22 (c636fd0f67)

Removed:
- Redis: Removed in Laravel 8.4.4 due to conflicting with the global Redis class from the default Redis driver (612d166004)

Some of this could be backported but 🤷
2022-02-13 22:42:18 -06:00
Luke Towers
6fc163a0dc app config changes from Laravel 9 skeleton 2022-02-13 22:02:20 -06:00
Luke Towers
15afb45df0 Improve support PHP 8.1 & align return types with Laravel base classes
See laravel/framework#40471
2022-02-13 11:32:03 -06:00
Luke Towers
4b1f22b8ba Update dependencies to match Laravel recommendations 2022-02-13 11:23:17 -06:00
Luke Towers
defe284303 Merge branch 'develop' into wip/1.2 2022-02-13 10:54:44 -06:00
Jack Wilkinson
9cb42fc6ca
Add support for the Laravel asset() helpers (#426)
Related: https://github.com/wintercms/storm/pull/67
2022-02-13 10:52:47 -06:00
Luke Towers
2ff9ad250b
Update modules/system/console/MixCompile.php
Co-authored-by: Ben Thomson <git@alfreido.com>
2022-02-13 09:42:12 -06:00
Luke Towers
6808a7a698 Fix mix:compile & mix:watch commands
Also added additional checks to improve developer experience when running the commands.
2022-02-12 09:54:36 -06:00
Luke Towers
b3dc49f649 Remove usage of DIRECTORY_SEPERATOR, Windows supports both separators so this it was unnecessary. 2022-02-11 15:37:53 -06:00
Yoshio Tsukuda
cf5ae34f5a
Improved Japanese translation (#446)
Credit to @tukuyo
2022-02-11 14:46:11 -06:00
Luke Towers
cdfae4abd1 Automatically add laravel-mix as a package.json dependency if desired 2022-02-11 14:42:51 -06:00
Luke Towers
236ac3929f Add modification of package.json to mix:install and TTY passthrough support 2022-02-11 14:20:56 -06:00
Luke Towers
1cbbd6474d Use relative paths in the MixAssets manager 2022-02-11 14:20:10 -06:00
Luke Towers
b2de281815 Support installing previously unregistered Mix packages for valid modules, themes, & plugins. 2022-02-11 13:18:00 -06:00
Luke Towers
5a1367177a Update recommended VSCode extension to the official Winter CMS extension
See: https://github.com/wintercms/vscode-extension
Refs: #432
2022-02-10 22:42:59 -06:00
Luke Towers
1085be50b5 Implement autoregistration of Laravel Mix packages for modules, plugins, & themes.
Also renamed default to winter.mix.js instead of winter-mix.js started on the mix:install support.

Refs: #440, #401.
2022-02-10 16:10:07 -06:00
Luke Towers
76319578c7 Fixed typo 2022-02-08 02:31:55 -06:00
Luke Towers
95c1d9f695 Merge branch 'develop' into wip/snowboard
* develop: (25 commits)
  Use the asset helper for static assets
  Added asset filter & function versions of all System Twig filters (#428)
  Improve Japanese Translation (#435)
  Improved Latvian translation (#434)
  Improved Ukrainian translation (#433)
  Redirect to the myaccount page as a final fallback
  Improve Persian translations (#423)
  typo fix (#424)
  Improved Russian translation (#422)
  Tidy up
  Style fix
  Go to User's details page when clicking on related user from the roles update page
  Update recommend format for implementing controller behaviors
  Add support for default configuration file names for controller behaviors
  Attach default permissions to the publisher role
  Only show role user management in the update context
  Improve UserRole editing experience
  Fix support for readOnly on the datepicker formwidget.
  Sort assets alphabetically in the CMS Theme Editor (#420)
  VSCode recommended extensions (#417)
  ...
2022-02-07 20:30:15 -06:00
Luke Towers
8454066e2e Use the asset helper for static assets
Also removed the duplicated asset() Twig function.

This helps improve support for Laravel Vapor.
2022-02-06 20:45:31 -06:00
Jack Wilkinson
d96231c57a
Added asset filter & function versions of all System Twig filters (#428) 2022-02-06 19:30:47 -06:00
Yoshio Tsukuda
7aafab288a
Improve Japanese Translation (#435)
Credit to @tukuyo
2022-02-06 01:38:09 -06:00
Arvis Lācis
cd70964cc5
Improved Latvian translation (#434) 2022-02-04 14:30:31 -06:00
WebVPF
9c0ff263e3
Improved Ukrainian translation (#433) 2022-02-04 20:08:13 +08:00