Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Laravel 9 / PHP 8.1 #148

Merged
merged 256 commits into from
Jul 15, 2022
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
256 commits
Select commit Hold shift + click to select a range
b50a347
Replace SwiftMailer with Symfony Mailer
LukeTowers Dec 9, 2021
8c75a83
Merge branch 'develop' into wip/1.2
LukeTowers Dec 9, 2021
2bee2f2
Support Symfony 6.
LukeTowers Dec 9, 2021
6292bd3
Align the CmsException with the Winter ExceptionBase class
LukeTowers Dec 9, 2021
8dc65fb
Merge branch 'develop' into wip/1.2
LukeTowers Dec 9, 2021
55e9cad
Use the VersionYamlParser when parsing the version.yaml file
LukeTowers Dec 9, 2021
f85342c
Initial support for Flysystem 2.0
LukeTowers Dec 10, 2021
2119161
Support for Symfony 6
LukeTowers Dec 10, 2021
0b66462
Remove mentions of Rackspace and isolate the storage directory used b…
LukeTowers Dec 10, 2021
82f727d
Merge branch 'develop' into wip/1.2
bennothommo Dec 14, 2021
0bc47e2
Update modules/backend/controllers/Files.php
LukeTowers Dec 14, 2021
099f731
Remove database.useConfigForTesting
LukeTowers Dec 14, 2021
77c7e80
Update modules/system/classes/PluginBase.php
LukeTowers Dec 14, 2021
bff21da
Skipped failing tests for now, removed timeout on winter:test command…
LukeTowers Dec 14, 2021
6a00f44
Merge branch 'wip/1.2' of github.com:wintercms/winter into wip/1.2
LukeTowers Dec 14, 2021
2ccc5f6
Merge branch 'develop' into wip/1.2
LukeTowers Dec 14, 2021
ace5768
Style fix
LukeTowers Dec 14, 2021
b414396
Fix library switcher
LukeTowers Dec 14, 2021
a0a0073
Extend abstract Yaml Processor
bennothommo Dec 17, 2021
f4d1b83
Merge branch 'develop' into wip/1.2
bennothommo Jan 12, 2022
4af92de
Merge branch 'develop' into wip/config-file
jaxwilko Jan 14, 2022
b0cff6b
Added fix to when loading config values to write in env file
jaxwilko Jan 14, 2022
7b6244d
Updated test case with all strings being quoted
jaxwilko Jan 14, 2022
defe284
Merge branch 'develop' into wip/1.2
LukeTowers Feb 13, 2022
4b1f22b
Update dependencies to match Laravel recommendations
LukeTowers Feb 13, 2022
15afb45
Improve support PHP 8.1 & align return types with Laravel base classes
LukeTowers Feb 13, 2022
6fc163a
app config changes from Laravel 9 skeleton
LukeTowers Feb 14, 2022
58b5b57
Bring the default aliases up to date with Laravel 9
LukeTowers Feb 14, 2022
b532c66
Add and comment out missing Js facade
LukeTowers Feb 14, 2022
f651097
Sync config defaults with Laravel 9.x skeleton
LukeTowers Feb 14, 2022
589ff43
Cleanup console command return types
LukeTowers Feb 14, 2022
301ffd1
Update testing dependencies to match Laravel 9
LukeTowers Feb 14, 2022
b7c92ff
Apply correct default for cookie.secure config
bennothommo Feb 15, 2022
d61ac9d
Move CMS console commands into the CMS module
LukeTowers Feb 15, 2022
4e85685
Merge branch 'wip/1.2' of github.com:wintercms/winter into wip/1.2
LukeTowers Feb 15, 2022
bb58ad9
Remove server.php
LukeTowers Feb 15, 2022
cd77772
Initial support for command autocompletion
LukeTowers Feb 15, 2022
261a627
Don't load plugin routes if routes are cached
LukeTowers Feb 15, 2022
12a9182
Merge branch 'develop' into wip/1.2
LukeTowers Feb 15, 2022
be45c63
Code style fix
LukeTowers Feb 15, 2022
8a79307
Run workflows on wip/1.2
LukeTowers Feb 15, 2022
7f6fcb5
Don't defer registering module routes
LukeTowers Feb 16, 2022
421d7ae
Remove debugging code
LukeTowers Feb 16, 2022
a9f7f2c
Bump phpcs dependency to support // phpcs: comment syntax
LukeTowers Feb 16, 2022
79aaaee
Only normalize plaintext files when generating FileManifests
LukeTowers Feb 17, 2022
897263e
Run default config files through ConfigWriter to minimize changed lin…
LukeTowers Feb 17, 2022
5be10dd
Merge branch 'wip/1.2' into wip/config-file
LukeTowers Feb 17, 2022
eaf3d51
Bring in line with changes to the storm PR
LukeTowers Feb 17, 2022
d5871f3
Fix botched merge
LukeTowers Feb 17, 2022
674ee32
Fix winter:env test
LukeTowers Feb 17, 2022
c3bdfae
Run the default config through ArrayFile parser
LukeTowers Feb 17, 2022
33441c0
Revert changes to winter:install, ConfigWriter uses ArrayFile internally
LukeTowers Feb 18, 2022
3fec059
Initial work on refactoring the Twig usage to use separate environmen…
LukeTowers Feb 18, 2022
77ef563
Refactor CMS Twig environment.
LukeTowers Feb 18, 2022
895c032
loadTemplate($name) -> load($name)
LukeTowers Feb 18, 2022
a8160d0
Fix Twig type hints
LukeTowers Feb 18, 2022
f4efb89
Retain spaceless tag in Twig (#456)
bennothommo Feb 18, 2022
c713c7d
Polyfill {% filter %} token removed in Twig v3
LukeTowers Feb 18, 2022
cdffe6d
Add AssetCombiner aliases for Snowboard (#459)
LukeTowers Feb 18, 2022
c2ad6b3
Code style fix and replaced use of {% filter %} in the demo theme
LukeTowers Feb 18, 2022
b568f36
Add tests for polyfilled {% filter %} Twig tag
LukeTowers Feb 18, 2022
ec03986
Unskip working tests
LukeTowers Feb 18, 2022
1ff786a
Fix twig tests on Windows
LukeTowers Feb 18, 2022
29c051b
Fix FilterTest on Windows
LukeTowers Feb 18, 2022
55fa690
Fix Spaceless test on Windows
LukeTowers Feb 18, 2022
216583f
Add more detailed failure message to the ExportModelTest
LukeTowers Feb 18, 2022
22cbfe9
Fix ExportModelTest on PHP 8.1
LukeTowers Feb 18, 2022
8132617
Merge pull request #455 from wintercms/wip/twig-environments
LukeTowers Feb 18, 2022
7130a80
Fix support for morphOne/hasOne relations in FormModelSaver (#463)
mjauvin Feb 18, 2022
6611102
Fix support for | page filter.
LukeTowers Feb 19, 2022
4312ad3
Include newly added filters-test in test case to fix tests
LukeTowers Feb 19, 2022
3147d97
Compile client side translations
LukeTowers Feb 19, 2022
7edb3e0
Temporarily disable VersionYamlProcessor
LukeTowers Feb 19, 2022
9b1154b
Temporarily disable extra functionality in the VersionYamlProcessor
LukeTowers Feb 19, 2022
d3d4918
Add asset alias for Snowboard extras css (#464)
LukeTowers Feb 20, 2022
9a6f71e
Fix route order with new system.beforeRoute and system.route events (…
mjauvin Feb 21, 2022
7026baf
Switch to using Assetic v3 instead of embedded Assetic v1 (#470)
LukeTowers Feb 22, 2022
f38f38f
fix assetic modules path
mjauvin Feb 22, 2022
687b441
Temporarily avoid testing problematic YAML
LukeTowers Feb 23, 2022
8e766dc
Don't attempt to setup the ThemeLog if the settings table can't be fo…
LukeTowers Feb 23, 2022
f24a638
WIP test adjustments
LukeTowers Feb 23, 2022
f594d44
Restore original YAML processor, merge changes
bennothommo Feb 23, 2022
defb57f
Re-establish full YAML processor with tweaks.
bennothommo Feb 23, 2022
89397eb
Prevent testing direct pushes to wip/1.2 - test the PR instead
bennothommo Feb 23, 2022
30a4f80
Debug branches in action
bennothommo Feb 23, 2022
2a47cec
Further debugging
bennothommo Feb 23, 2022
040c6b9
Let's try this...
bennothommo Feb 23, 2022
e3fecdb
Move scaffold commands (#471)
bennothommo Feb 23, 2022
2368afc
Improved support for autocompletion for the plugin:* commands
LukeTowers Feb 24, 2022
183661d
Improve confirmation behavior for destructive actions
LukeTowers Feb 25, 2022
f060c7f
Move the winter:passwd command into the Backend module
LukeTowers Feb 25, 2022
3152265
Cleanup scaffolding stubs
LukeTowers Feb 25, 2022
b1aa0fc
Cleanup console docblocks
LukeTowers Feb 25, 2022
680fe81
Ensure that mix:watch cleans up after itself
LukeTowers Feb 25, 2022
d2f986d
Fix failing tests due to plugin:refresh command change
bennothommo Feb 25, 2022
401af92
Prevent mix:install from timing out prematurely
bennothommo Feb 25, 2022
4d409cf
Update modules/system/classes/PluginBase.php
LukeTowers Feb 25, 2022
5e19056
Update modules/system/classes/UpdateManager.php
LukeTowers Feb 25, 2022
c187a08
Update modules/system/classes/VersionManager.php
LukeTowers Feb 25, 2022
c21130e
Suppress exception when mix:watch is terminated
bennothommo Feb 25, 2022
ce3a913
Merge branch 'wip/1.2' of github.com:wintercms/winter into wip/1.2
bennothommo Feb 25, 2022
f487b13
Code smell
bennothommo Feb 25, 2022
fde586a
Merge branch 'develop' into wip/1.2
LukeTowers Feb 25, 2022
77f79f6
Add missing import
LukeTowers Feb 28, 2022
0e53ff2
Fix missing import
LukeTowers Mar 1, 2022
05b941e
More fixes to the mailer
LukeTowers Mar 1, 2022
9a800ad
Additional test cases and fixes for Version Yaml parser
bennothommo Mar 1, 2022
8258df3
Fix unit tests
bennothommo Mar 1, 2022
896105e
Merge branch 'develop' into wip/1.2
LukeTowers Mar 2, 2022
8dc6fd5
Merge branch 'develop' into wip/1.2
LukeTowers Mar 2, 2022
8013a57
Revert "Run default config files through ConfigWriter to minimize cha…
LukeTowers Mar 4, 2022
f6c5bbf
Merge branch 'wip/1.2' into wip/config-write-replacement
LukeTowers Mar 4, 2022
745b4f6
Merge branch 'wip/1.2' into wip/config-write-replacement
jaxwilko Mar 4, 2022
fb142e6
Merge branch 'wip/config-file' into wip/config-write-replacement
jaxwilko Mar 4, 2022
1288d35
Merge branch 'wip/config-write-replacement' of github.com:wintercms/w…
LukeTowers Mar 5, 2022
bb67f3e
Use env() settings by default in config/cms.php (#484)
mjauvin Mar 8, 2022
574c7d4
Initial work on re-aligning the scaffolding commands with Laravel
LukeTowers Mar 9, 2022
ae5b0c2
Fix issue with refactored Symfony component
LukeTowers Mar 9, 2022
50417b2
Remove support for varcharmax
LukeTowers Mar 9, 2022
f14642c
Fix scope overreach of migration from 2016.
LukeTowers Mar 12, 2022
82dc107
Strip double / prefix when uploading to Media root directory
Flynsarmy Mar 12, 2022
7a0a41d
Make getMediaPath and getStorageDisk methods public
Flynsarmy Mar 13, 2022
8693819
Make getMediaPath public
Flynsarmy Mar 13, 2022
765f55e
Merge pull request #491 from Flynsarmy/uploadFilepath
LukeTowers Mar 14, 2022
cb382a0
Added missing return statement
LukeTowers Mar 15, 2022
70cfd90
Revert "Run the default config through ArrayFile parser"
LukeTowers Mar 16, 2022
140d388
Merge branch 'wip/1.2' into wip/config-write-replacement
LukeTowers Mar 16, 2022
520190f
Tweaks to be more friendly with the ArrayFile parser
LukeTowers Mar 16, 2022
3da0a32
Merge branch 'wip/config-write-replacement' into wip/config-file
LukeTowers Mar 16, 2022
cd9f909
Style fix
LukeTowers Mar 16, 2022
c137760
Run all config files through ArrayFile parser
LukeTowers Mar 16, 2022
f2d9526
Support new mail config file structure
LukeTowers Mar 16, 2022
36a42a6
Merge pull request #404 from wintercms/wip/config-file
LukeTowers Mar 16, 2022
3cf4b5a
Fix isActive for CMS page with "/" as URL (#479)
mjauvin Mar 18, 2022
c1bc900
Sync MailSettings model init with L9 mail config changes (#500)
mjauvin Mar 18, 2022
4a2bffa
Multiple file attachments in theme customization (#495)
damsfx Mar 18, 2022
80880d1
Refresh datasource path cache before syncing paths
LukeTowers Mar 18, 2022
e433aa3
Prevent error if accessing undefined $resizer variable (#502)
mjauvin Mar 21, 2022
02efa1a
Fixed ImageResizer support for "system" images (plugin, theme, module…
LukeTowers Mar 22, 2022
9301a98
Merge branch 'wip/1.2' into wip/1.2-improve-scaffolding
LukeTowers Mar 23, 2022
c371900
Simplify diff
LukeTowers Mar 23, 2022
0641ab7
Adjusted interfaces and made create:plugin include translations
LukeTowers Mar 23, 2022
a02c334
Add localization support to create:controller
LukeTowers Mar 23, 2022
00f721c
Localized create:model scaffolding
LukeTowers Mar 23, 2022
ecc258d
Simplify prepareVars usage, fix create:theme usage
LukeTowers Mar 23, 2022
7b7add2
Merge develop into 1.2
LukeTowers Mar 24, 2022
752d6ad
fix null coalescent operator (#518)
mjauvin Mar 31, 2022
2c74cdb
Merge branch 'wip/1.2' into wip/1.2-improve-scaffolding
LukeTowers Apr 3, 2022
574437b
Moved GeneratorCommand back to Scaffold
LukeTowers Apr 3, 2022
1934cea
Plugins should be generated the same no matter what OS is being used …
LukeTowers Apr 3, 2022
e2e2fc4
Stub out create:migration
LukeTowers Apr 3, 2022
f3c9a25
Fix create:controller command
LukeTowers Apr 3, 2022
6fd53d4
Improve Settings scaffolding
LukeTowers Apr 3, 2022
09e80e9
Merge pull request #486 from wintercms/wip/1.2-improve-scaffolding
LukeTowers Apr 3, 2022
9e1a02c
Update MailSettings for new Laravel mail config structure. (#522)
mjauvin Apr 5, 2022
5ff453a
Minor tweaks; moved SES fields to the Winter.DriverAWS plugin
LukeTowers Apr 5, 2022
9aedac5
Merge pull request #526 from wintercms/wip/1.2-fix-backend-mail-settings
LukeTowers Apr 5, 2022
c456a32
Add "send test message" button on MailSettings page (#528)
mjauvin Apr 6, 2022
b748222
change confirmation prompt (#529)
mjauvin Apr 7, 2022
0a1b289
Merge branch 'develop' into wip/1.2
bennothommo Apr 7, 2022
4f40137
Merge branch 'develop' into wip/1.2
bennothommo Apr 19, 2022
2a8afec
Make "mix:update" command compatible with 1.2
bennothommo Apr 19, 2022
0b573cc
Merge branch 'develop' into wip/1.2
bennothommo Apr 19, 2022
65e19d9
Allow for nested partial files in components in the recommended exten…
WebVPF Apr 21, 2022
d9cdf3d
Only show "Send test message" button on Mail Settings page (#537)
mjauvin Apr 24, 2022
7eda7b4
Merge branch 'develop' into wip/1.2
bennothommo Apr 29, 2022
643a581
Add support for .php as a backend partial extension
LukeTowers May 2, 2022
85b1330
Use .php for the backend view extension instead of .htm
LukeTowers May 2, 2022
747122f
Fixes for Windows & linter for ViewMaker trait
LukeTowers May 2, 2022
175580a
Implement code style for partials.
bennothommo May 2, 2022
ceb6cca
Fix linting issue with fileupload partial
bennothommo May 2, 2022
c9c4b61
Fix windows tests & update references to backend view files
LukeTowers May 2, 2022
fc57f5b
hide smtp user/password fields if smtp authorization is false (#544)
mjauvin May 2, 2022
9b7bdc2
Merge branch 'develop' into wip/1.2
bennothommo May 5, 2022
6298026
Compile all assets
bennothommo May 6, 2022
bd3401f
Upgrade Font Awesome 4 to 6
bennothommo May 6, 2022
afb9ae8
Fix shimmed icons, remove some CSS variables, recompile
bennothommo May 6, 2022
ad47043
Remove extra license file
bennothommo May 7, 2022
872be9d
Merge branch 'develop' into wip/1.2
LukeTowers May 8, 2022
1b3e01e
Merge branch 'wip/1.2' into wip/1.2-font-awesome-6
bennothommo May 11, 2022
47e01dc
Remove explicit links to icon LESS file.
bennothommo May 11, 2022
af9876b
Compile icon styling into separate CSS file
bennothommo May 11, 2022
8c9de1b
Load separate icon file in Backend pages
bennothommo May 11, 2022
1a6ab95
Move icons into root UI folder.
bennothommo May 11, 2022
2df04a7
Fix font location
bennothommo May 11, 2022
3e42463
Load a subset of icons for the exception / message views
bennothommo May 11, 2022
eb37a26
Add docs for icons
bennothommo May 11, 2022
613a925
Merge pull request #551 from wintercms/wip/1.2-font-awesome-6
LukeTowers May 11, 2022
01d926a
Fix icon usage for ReportContainers, AssetList, & Table widgets
LukeTowers May 11, 2022
e6440da
Fix prefixed shims overriding entire element with FA font
bennothommo May 12, 2022
a64422b
View Maker guessed paths can be null
bennothommo May 12, 2022
f8be6d7
Optimise shimmed icon CSS
bennothommo May 12, 2022
5e3e9ef
Revert "Optimise shimmed icon CSS"
bennothommo May 12, 2022
4ca721c
Manually optimise shimmed icon CSS
bennothommo May 12, 2022
6cec274
Merge branch 'develop' into wip/1.2
bennothommo May 12, 2022
051826c
Include brand icons, small optimisation
bennothommo May 12, 2022
6ac09ad
Drop "oc-" prefix for icons introduced in Font Awesome 6.
bennothommo May 12, 2022
40e625c
Remove Workshop theme from repo.
bennothommo May 12, 2022
907393a
Respect app.asset_url in AssetMaker (#552)
jaxwilko May 12, 2022
78a7201
Force resized images to be regenerated when the source image changes …
LukeTowers May 12, 2022
ae2e298
Remove blog plugin from repo
bennothommo May 13, 2022
af311f7
Normalize versions pulled from the version.yaml
LukeTowers May 13, 2022
20ac7f6
Small refactor to workflow utilities (#555)
jaxwilko May 16, 2022
3862bf2
Added TailwindCSS-based scaffold to the create:theme command
LukeTowers May 16, 2022
14f9de0
Merge branch 'develop' into wip/1.2
bennothommo May 16, 2022
97928c9
Merge branch 'develop' into wip/1.2
bennothommo May 17, 2022
edc99c7
Merge branch 'develop' into wip/1.2
bennothommo May 19, 2022
39f1735
Merge branch 'develop' into wip/1.2
bennothommo May 19, 2022
d526db3
Merge branch 'develop' into wip/1.2
bennothommo May 23, 2022
f758984
Improve error handling of invalid values provided to the DatePicker F…
LukeTowers May 23, 2022
5b4ca04
Merge branch 'develop' into wip/1.2
bennothommo May 24, 2022
805b95b
Allow decompilation of local assets that match local URL
bennothommo May 25, 2022
1bbfb67
Revamp Plugin Manager (#501)
LukeTowers Jun 3, 2022
582725b
Merge branch 'develop' into wip/1.2
bennothommo Jun 5, 2022
01aa5fb
Fix code smell
bennothommo Jun 5, 2022
74b9df6
Improve reliability of cache:clear
LukeTowers Jun 13, 2022
018d39f
fix typo
mjauvin Jun 18, 2022
225313f
Moved plugin replacement namespace aliasing into register replacement…
jaxwilko Jun 20, 2022
64b82f0
[FIX] Fix plugin flags not loading from cache correctly (#582)
jaxwilko Jun 21, 2022
7fe167c
Split tests into relevant module folders
jaxwilko Jun 22, 2022
9e4e36b
Added replaced plugins to the normalize map to ensure classloader nam…
jaxwilko Jun 23, 2022
5870275
Add additional testMakePartial cases to ViewMaker unit tests (#586)
mjauvin Jun 24, 2022
5201d71
Merge branch 'develop' into wip/1.2
bennothommo Jun 24, 2022
fe312df
Allow a string selector for the form in a request
bennothommo Jun 24, 2022
3dd8d61
Switch back to using Laravel CacheServiceProvider
LukeTowers Jun 25, 2022
7a25524
Fix site relative partial paths failing in 1.2 (#587)
bennothommo Jun 25, 2022
e58c768
Bump minimum Laravel version to 9.1
LukeTowers Jun 25, 2022
5ccde6f
Merge remote-tracking branch 'origin/develop' into wip/1.2
bennothommo Jun 28, 2022
0860a7a
Added fix to ensure correct normalization and return (#588)
jaxwilko Jun 29, 2022
725fbc0
Use the ImageResizer for resizing and cropping in the MediaManager (#…
jaxwilko Jun 29, 2022
ce63a34
Merge branch 'develop' into wip/1.2
bennothommo Jul 1, 2022
0add226
Code analysis tweaks (#589)
bennothommo Jul 4, 2022
e13c453
Fix constructor signature in Meta class
bennothommo Jul 4, 2022
b90b4fe
Fix constructor signature in User Throttle model
bennothommo Jul 4, 2022
60f0651
Added defaults to brand settings config calls (#595)
jaxwilko Jul 5, 2022
c0119a0
Fix return type in placeholderFunction (#594)
RomainMazB Jul 5, 2022
a31fa1b
Added lazy resizing support for thumbnail view in media manager
jaxwilko Jul 6, 2022
585949a
Code review
LukeTowers Jul 6, 2022
b29d1b9
Code style fixes
LukeTowers Jul 6, 2022
c9a72b8
Merge pull request #596 from wintercms/wip/1.2-fix-mediamanger-thumbn…
LukeTowers Jul 6, 2022
b52d4ac
Cleanup unnecessary imports
LukeTowers Jul 6, 2022
6d23e21
Remove plugin from pluginFlags property if it has no active flags
LukeTowers Jul 7, 2022
f05aba7
Default to public visibility for the local disk
LukeTowers Jul 8, 2022
7586151
Add aliases for base test classes for compatibility
LukeTowers Jul 8, 2022
c8d5767
Add create:job scaffolding command
LukeTowers Jul 8, 2022
77f4606
Add unit test for #578
bennothommo Jul 9, 2022
e2683d8
Actually finish the test
bennothommo Jul 9, 2022
5b8d189
Fix issues with accessing the expected context variables inside of Tw…
LukeTowers Jul 10, 2022
f84ba7c
Improved Russian translation (#605)
WebVPF Jul 15, 2022
6f12f8a
Merge branch 'develop' into wip/1.2
LukeTowers Jul 15, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
max-parallel: 8
matrix:
operatingSystem: [ubuntu-latest, windows-latest]
phpVersion: ['7.2', '7.3', '7.4', '8.0']
phpVersion: ['8.0', '8.1']
fail-fast: false
runs-on: ${{ matrix.operatingSystem }}
name: ${{ matrix.operatingSystem }} / PHP ${{ matrix.phpVersion }}
Expand Down Expand Up @@ -82,6 +82,10 @@ jobs:
if: github.ref == 'refs/heads/1.1' || github.base_ref == '1.1'
run: php ./.github/workflows/utilities/library-switcher "1.1.x-dev as 1.1"

- name: Switch library dependency (1.2)
if: github.ref == 'refs/heads/1.2' || github.base_ref == '1.2'
run: php ./.github/workflows/utilities/library-switcher "1.2.x-dev as 1.2"

- name: Setup dependency cache
id: composercache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
Expand All @@ -103,7 +107,7 @@ jobs:
run: php artisan package:discover

- name: Setup problem matchers for PHPUnit
if: matrix.phpVersion == '7.4'
if: matrix.phpVersion == '8.1'
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"

- name: Run Linting and Tests
Expand Down
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
"source": "https://github.com/wintercms/winter"
},
"require": {
"php": "^7.2.9|^8.0",
"winter/storm": "dev-develop as 1.1.999",
"winter/wn-system-module": "dev-develop as 1.1.999",
"winter/wn-backend-module": "dev-develop as 1.1.999",
"winter/wn-cms-module": "dev-develop as 1.1.999",
"laravel/framework": "~6.0",
"php": "^8.0.2",
"winter/storm": "dev-wip/1.2 as 1.2",
"winter/wn-system-module": "dev-wip/1.2",
"winter/wn-backend-module": "dev-wip/1.2",
"winter/wn-cms-module": "dev-wip/1.2",
"laravel/framework": "9.x-dev",
"wikimedia/composer-merge-plugin": "~2.0.1"
},
"require-dev": {
Expand Down
18 changes: 10 additions & 8 deletions config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,15 @@
| from your proxy when rewriting the request. This is an integer map value
| so you may specify more than one value.
|
| Possible values (prepended with `Illuminate\Http\Request::`)
| - HEADER_X_FORWARDED_ALL - trust all forwarded headers
| - HEADER_X_FORWARDED_FOR - trust only the proxy IP
| - HEADER_X_FORWARDED_HOST - trust only the proxy hostname
| - HEADER_X_FORWARDED_PORT - trust only the proxy port
| - HEADER_X_FORWARDED_PROTO - trust only the proxy protocol
| - HEADER_X_FORWARDED_AWS_ELB - trust Amazon Elastic Load Balancing header
| Possible values:
| - 'HEADER_X_FORWARDED_ALL' - trust all forwarded headers
| - Illuminate\Http\Request::HEADER_X_FORWARDED_FOR - trust only the proxy IP
| - Illuminate\Http\Request::HEADER_X_FORWARDED_HOST - trust only the proxy hostname
| - Illuminate\Http\Request::HEADER_X_FORWARDED_PORT - trust only the proxy port
| - Illuminate\Http\Request::HEADER_X_FORWARDED_PROTO - trust only the proxy protocol
| - Illuminate\Http\Request::HEADER_X_FORWARDED_PREFIX - trust only the proxy prefix
| - Illuminate\Http\Request::HEADER_X_FORWARDED_AWS_ELB - trust Amazon Elastic Load Balancing headers
| - Illuminate\Http\Request::HEADER_X_FORWARDED_TRAEFIK - trust Traefik reverse proxy headers
|
| Examples:
| - To trust only the hostname, use the following:
Expand All @@ -132,7 +134,7 @@
| - Amazon ELB users should always use the "HEADER_X_FORWARDED_AWS_ELB" option.
*/

'trustedProxyHeaders' => Illuminate\Http\Request::HEADER_X_FORWARDED_ALL,
'trustedProxyHeaders' => 'HEADER_X_FORWARDED_ALL',
LukeTowers marked this conversation as resolved.
Show resolved Hide resolved

/*
|--------------------------------------------------------------------------
Expand Down
10 changes: 1 addition & 9 deletions config/filesystems.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
| may even configure multiple disks of the same driver. Defaults have
| been setup for each driver as an example of the required options.
|
| Supported Drivers: "local", "ftp", "sftp", "s3", "rackspace"
| Supported Drivers: "local", "ftp", "sftp", "s3"
|
*/

Expand All @@ -59,14 +59,6 @@
// 'endpoint' => env('AWS_ENDPOINT'),
],

'rackspace' => [
'driver' => 'rackspace',
'username' => 'your-username',
'key' => 'your-key',
'container' => 'your-container',
'endpoint' => 'https://identity.api.rackspacecloud.com/v2.0/',
'region' => 'IAD',
],
],

];
64 changes: 64 additions & 0 deletions config/testing/filesystems.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<?php

return [

/*
|--------------------------------------------------------------------------
| Default Filesystem Disk
|--------------------------------------------------------------------------
|
| Here you may specify the default filesystem disk that should be used
| by the framework. The "local" disk, as well as a variety of cloud
| based disks are available to your application. Just store away!
|
*/

'default' => 'local',

/*
|--------------------------------------------------------------------------
| Default Cloud Filesystem Disk
|--------------------------------------------------------------------------
|
| Many applications store files both locally and in the cloud. For this
| reason, you may specify a default "cloud" driver here. This driver
| will be bound as the Cloud disk implementation in the container.
|
*/

'cloud' => 's3',

/*
|--------------------------------------------------------------------------
| Filesystem Disks
|--------------------------------------------------------------------------
|
| Here you may configure as many filesystem "disks" as you wish, and you
| may even configure multiple disks of the same driver. Defaults have
| been setup for each driver as an example of the required options.
|
| Supported Drivers: "local", "ftp", "sftp", "s3"
|
*/

'disks' => [

'local' => [
'driver' => 'local',
'root' => base_path('tests/storage'),
'url' => '/tests/storage',
],

's3' => [
'driver' => 's3',
'key' => '',
'secret' => '',
'region' => '',
'bucket' => '',
// 'url' => env('AWS_URL'),
// 'endpoint' => env('AWS_ENDPOINT'),
],

],

];
9 changes: 3 additions & 6 deletions modules/backend/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,14 @@
}
],
"require": {
"php": ">=7.2",
"composer/installers": "~1.11",
"laravel/framework": "~6.0"
"php": "^8.0.2",
"composer/installers": "~1.11.0",
"laravel/framework": "9.x-dev"
},
"autoload": {
"psr-4": {
"Backend\\": ""
}
},
"extra": {
"installer-name": "backend"
},
"minimum-stability": "dev"
}
45 changes: 23 additions & 22 deletions modules/backend/controllers/Files.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use Backend\Classes\Controller;
use ApplicationException;
use Exception;
use RuntimeException;

/**
* Backend files controller
Expand Down Expand Up @@ -64,33 +65,33 @@ public function thumb($code = null, $width = 100, $height = 100, $mode = 'auto',
*/
protected static function getTemporaryUrl($file, $path = null)
{
// Get the disk and adapter used
$url = null;
// Get the disk used
$disk = $file->getDisk();
$adapter = $disk->getAdapter();
if (class_exists('\League\Flysystem\Cached\CachedAdapter') && $adapter instanceof \League\Flysystem\Cached\CachedAdapter) {
$adapter = $adapter->getAdapter();
}

if ((class_exists('\League\Flysystem\AwsS3v3\AwsS3Adapter') && $adapter instanceof \League\Flysystem\AwsS3v3\AwsS3Adapter) ||
(class_exists('\League\Flysystem\Rackspace\RackspaceAdapter') && $adapter instanceof \League\Flysystem\Rackspace\RackspaceAdapter) ||
method_exists($adapter, 'getTemporaryUrl')
) {
if (empty($path)) {
$path = $file->getDiskPath();
}
if (empty($path)) {
$path = $file->getDiskPath();
}

// Check to see if the URL has already been generated
$pathKey = 'backend.file:' . $path;
$url = Cache::get($pathKey);
// Check to see if the URL has already been generated
$pathKey = 'backend.file:' . $path;
$url = Cache::get($pathKey, null);

// The AWS S3 storage drivers will return a valid temporary URL even if the file does not exist
if (is_null($url) && $disk->exists($path)) {
$expires = now()->addSeconds(Config::get('cms.storage.uploads.temporaryUrlTTL', 3600));
$url = Cache::remember($pathKey, $expires, function () use ($disk, $path, $expires) {
if ($url !== false && is_null($url) && $disk->exists($path)) {
LukeTowers marked this conversation as resolved.
Show resolved Hide resolved
$expires = now()->addSeconds(Config::get('cms.storage.uploads.temporaryUrlTTL', 3600));
$url = Cache::remember($pathKey, $expires, function () use ($disk, $path, $expires) {
// Attempt to generate a temporary URL, if a RuntimeException occurs it's "probably"
// because the driver doesn't support that method
try {
return $disk->temporaryUrl($path, $expires);
});
}
} catch (RuntimeException $ex) {
return false;
}
});
}

// Limit the return types to strings or null
if (!is_string($url) || empty($url)) {
$url = null;
}

return $url;
Expand Down
30 changes: 15 additions & 15 deletions modules/cms/classes/CmsException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use Twig\Error\Error as TwigError;
use Winter\Storm\Exception\ApplicationException;
use Winter\Storm\Halcyon\Processors\SectionParser;
use Exception;
use Throwable;

/**
* The CMS exception class.
Expand Down Expand Up @@ -40,9 +40,9 @@ class CmsException extends ApplicationException
* Error 200: Mask the exception as INI content.
* Error 300: Mask the exception as PHP content.
* Error 400: Mask the exception as Twig content.
* @param \Exception $previous Previous exception.
* @param Throwable $previous Previous exception.
*/
public function __construct($message = null, $code = 100, Exception $previous = null)
public function __construct($message = null, $code = 100, Throwable $previous = null)
{
if ($message instanceof CmsCompoundObject || $message instanceof ComponentPartial) {
$this->compoundObject = $message;
Expand All @@ -62,10 +62,10 @@ public function __construct($message = null, $code = 100, Exception $previous =
* has occurred in external code, the function will return false. Otherwise return
* true and modify the exception by overriding it's content, line and message values
* to be accurate against a CMS object properties.
* @param \Exception $exception The exception to modify.
* @param Throwable $exception The exception to modify.
* @return bool
*/
public function processCompoundObject(Exception $exception)
public function processCompoundObject(Throwable $exception)
{
switch ($this->code) {
case 200:
Expand Down Expand Up @@ -94,10 +94,10 @@ public function processCompoundObject(Exception $exception)
/**
* Override properties of an exception specific to the INI section
* of a CMS object.
* @param \Exception $exception The exception to modify.
* @param Throwable $exception The exception to modify.
* @return bool
*/
protected function processIni(Exception $exception)
protected function processIni(Throwable $exception)
{
$message = $exception->getMessage();

Expand Down Expand Up @@ -137,15 +137,15 @@ protected function processIni(Exception $exception)
/**
* Override properties of an exception specific to the PHP section
* of a CMS object.
* @param \Exception $exception The exception to modify.
* @param Throwable $exception The exception to modify.
* @return bool
*/
protected function processPhp(Exception $exception)
protected function processPhp(Throwable $exception)
{
/*
* Fatal Error
*/
if ($exception instanceof \Symfony\Component\Debug\Exception\FatalErrorException) {
if ($exception instanceof \Symfony\Component\ErrorHandler\Error\FatalError) {
$check = false;

// Expected: */modules/cms/classes/CodeParser.php(165) : eval()'d code line 7
Expand Down Expand Up @@ -193,10 +193,10 @@ protected function processPhp(Exception $exception)
/**
* Override properties of an exception specific to the Twig section
* of a CMS object.
* @param \Exception $exception The exception to modify.
* @param Throwable $exception The exception to modify.
* @return bool
*/
protected function processTwig(Exception $exception)
protected function processTwig(Throwable $exception)
{
// Must be a Twig related exception
if (!$exception instanceof TwigError) {
Expand All @@ -219,14 +219,14 @@ protected function processTwig(Exception $exception)
/**
* Masks this exception with the details of the supplied. The error code for
* this exception object will determine how the supplied exception is used.
* Error 100: A general exception. Inherits \System\Classes\ExceptionBase::applyMask()
* Error 100: A general exception. Inherits \Winter\Storm\Exception\ExceptionBase::applyMask()
* Error 200: Mask the exception as INI content.
* Error 300: Mask the exception as PHP content.
* Error 400: Mask the exception as Twig content.
* @param \Exception $exception The exception to modify.
* @param Throwable $exception The exception to modify.
* @return void
*/
public function applyMask(Exception $exception)
public function applyMask(Throwable $exception)
{
if ($this->code == 100 || $this->processCompoundObject($exception) === false) {
parent::applyMask($exception);
Expand Down
9 changes: 3 additions & 6 deletions modules/cms/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,14 @@
}
],
"require": {
"php": ">=7.2",
"composer/installers": "~1.11",
"laravel/framework": "~6.0"
"php": "^8.0.2",
"composer/installers": "~1.11.0",
"laravel/framework": "9.x-dev"
},
"autoload": {
"psr-4": {
"Cms\\": ""
}
},
"extra": {
"installer-name": "cms"
},
"minimum-stability": "dev"
}
4 changes: 2 additions & 2 deletions modules/system/classes/ImageResizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,9 @@ public function getConfig()
// to support atomic deployments where the base application path changes
// each deployment but the realpath of the storage directory does not
if (FileHelper::isLocalDisk($disk)) {
$realPath = realpath($disk->getAdapter()->getPathPrefix());
$realPath = realpath($disk->getPathPrefix());
if ($realPath) {
$disk->getAdapter()->setPathPrefix($realPath);
$disk->setPathPrefix($realPath);
}
}

Expand Down