6251 Commits

Author SHA1 Message Date
Marc Jauvin
7130a80997
Fix support for morphOne/hasOne relations in FormModelSaver (#463)
Fixes #413
2022-02-18 15:52:47 -06:00
Luke Towers
8132617357
Merge pull request #455 from wintercms/wip/twig-environments
Refactor Twig registration and usage
2022-02-18 14:23:04 -06:00
Luke Towers
22cbfe94ac Fix ExportModelTest on PHP 8.1 2022-02-18 14:01:23 -06:00
Luke Towers
216583fbe4 Add more detailed failure message to the ExportModelTest 2022-02-18 13:50:16 -06:00
Luke Towers
55fa690c67 Fix Spaceless test on Windows 2022-02-18 13:47:43 -06:00
Luke Towers
29c051bf87 Fix FilterTest on Windows 2022-02-18 13:45:06 -06:00
Luke Towers
1ff786a4ca Fix twig tests on Windows 2022-02-18 13:36:26 -06:00
Luke Towers
ec03986892 Unskip working tests 2022-02-18 12:16:46 -06:00
Luke Towers
b568f36f1f Add tests for polyfilled {% filter %} Twig tag 2022-02-18 12:01:24 -06:00
Luke Towers
c2ad6b309f Code style fix and replaced use of {% filter %} in the demo theme 2022-02-18 09:50:18 -06:00
der_On
62c30c30d7
Improve German translation (#457)
Thanks to @der-On!
2022-02-18 09:42:30 -06:00
Luke Towers
cdffe6d179
Add AssetCombiner aliases for Snowboard (#459) 2022-02-18 09:41:43 -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
33441c0987 Revert changes to winter:install, ConfigWriter uses ArrayFile internally 2022-02-17 20:20:43 -06:00
Luke Towers
c3bdfae664 Run the default config through ArrayFile parser
This serves the dual purpose of both testing the output of the ArrayFile parser and normalizing the configs so that any future uses of ArrayFile on them will have easier to understand diffs.

These were generated by running the following in Tinker:

use Winter\Storm\Parse\PHP\ArrayFile;

$configPaths = glob(base_path('config/*'));

foreach ($configPaths as $path) {
  if (is_file($path)) {
  	ArrayFile::open($path)->write();
  }
}
2022-02-17 12:38:51 -06:00
Luke Towers
674ee32947 Fix winter:env test 2022-02-17 12:36:15 -06:00
Luke Towers
d5871f3b2e Fix botched merge 2022-02-17 11:25:49 -06:00
Luke Towers
eaf3d51669 Bring in line with changes to the storm PR 2022-02-17 11:17:33 -06:00
Luke Towers
5be10dd941 Merge branch 'wip/1.2' into wip/config-file
# Conflicts:
#	modules/system/console/WinterEnv.php
2022-02-17 10:51:59 -06:00
Luke Towers
897263e281 Run default config files through ConfigWriter to minimize changed lines on future uses 2022-02-17 10:46:22 -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
Ben Thomson
21e6783165
Use Winter CMS Twig flavour for component partials 2022-02-16 17:12:02 +08: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