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

Rebase October CMS on Laravel 6 #4893

Merged
merged 126 commits into from
Aug 9, 2020
Merged
Show file tree
Hide file tree
Changes from 30 commits
Commits
Show all changes
126 commits
Select commit Hold shift + click to select a range
25511bf
Added storage/framework/cache/data folder required by 5.6.
LukeTowers Jun 12, 2019
37db70a
Config changes from 5.6
LukeTowers Jun 12, 2019
1e3edae
Default backend user password requirements changed for utf8mb4 DB typ…
LukeTowers Jun 12, 2019
1aff1e0
Changed calls to the Cache to use DateTime instances instead of integ…
LukeTowers Jun 12, 2019
627c0aa
Replaced JSMin with JSqueeze
LukeTowers Jun 12, 2019
2fc515e
Updated environment file generation command to match what laravel is …
LukeTowers Jun 12, 2019
c7a026c
Add support for PHPUnit 7.0
LukeTowers Jun 12, 2019
7e31365
Merge branch 'develop' into wip/laravel-5.9
bennothommo Nov 21, 2019
5d3d4ad
Merge branch 'develop' into wip/laravel-5.9
bennothommo Jan 18, 2020
74cc4d4
Updated Composer dependencies for L6.
bennothommo Jan 19, 2020
ae63b09
Fix test case incompatibilities, clean up ignores
bennothommo Jan 19, 2020
662b1c2
Fix incompatible `where` method in CmsObjectCollection
bennothommo Jan 19, 2020
2c529cf
Update unit tests to not rely on deprecated methods of testing
bennothommo Jan 19, 2020
a4c34d1
Fix more exception tests
bennothommo Jan 19, 2020
4302f8d
Change module seeders to only temporary unguard attributes
bennothommo Jan 19, 2020
8279bc6
Seed admin password that passes our current validation rules
bennothommo Jan 19, 2020
9be2dec
Fix guarding for fixtures now that models aren't unguarded by seeders
bennothommo Jan 19, 2020
d6fc306
Un-mark skipped test - seems to be working
bennothommo Jan 19, 2020
852ed1a
Remove deprecated `getNotes` method from UpdateManager
bennothommo Jan 19, 2020
078eb91
Ensure October helpers are loaded before Laravel helpers
bennothommo Jan 19, 2020
56785bc
Fix missing output when UpdateManager is run within the Backend
bennothommo Jan 19, 2020
f9d7c79
Link Input alias to October's Input facade
bennothommo Jan 19, 2020
cf67e83
Make slug route param optional for CMS module.
bennothommo Jan 19, 2020
e81101c
Use updated branch name for library
bennothommo Jan 20, 2020
a7904d6
Drop PHP 7.1 tests
bennothommo Jan 20, 2020
ad27116
Drop code reset and library replacement in automated tests, for now
bennothommo Jan 20, 2020
b2d2d34
Fix code quality errors
bennothommo Jan 20, 2020
9ecad13
Comment tweak for CmsObjectCollection::where()
Jan 20, 2020
e099b7b
Move autoloading to index to make it the same as Laravel 6.
Jan 20, 2020
60d6825
Partially revert and restore bootstrap/autoload.php
Jan 20, 2020
a1cfc2a
Add Composer scripts
Jan 20, 2020
86351ce
Revert "Add Composer scripts"
Jan 20, 2020
0a63720
Add JUST the Composer scripts
Jan 20, 2020
11b7111
Use old signature for `where` method in CmsObjectCollection.
Jan 20, 2020
4716084
Change User rules to use min for character lengths
Jan 20, 2020
12208e5
Adjust User rules to limit lengths of emails and logins
Jan 20, 2020
12f5c17
Use default October log path for system logs
bennothommo Jan 21, 2020
c7b85fc
Default to using Bootstrap 3 pagination.
bennothommo Jan 21, 2020
0c2dc29
Add Discord URL
bennothommo Jan 21, 2020
e330324
Drop monkey-patch on mock objects generator.
bennothommo Jan 21, 2020
26944a5
Add simple unit tests for HasOneThrough and HasManyThrough relations
Jan 22, 2020
6aeb079
Add support for Postmark mail transport configuration
Jan 23, 2020
5f89a6c
Update composer file to use new subsplit repos
LukeTowers Jan 27, 2020
f700e23
Merge branch 'develop' into wip/laravel-6
LukeTowers Jan 27, 2020
65c3a88
[Laravel 6] Add support for Laravel Dusk tests (#4919)
bennothommo Feb 3, 2020
bb7df3c
Tweak code block in README
bennothommo Feb 3, 2020
6b114bf
Drop PHPUnit Selenium requirement
Feb 3, 2020
ef86ddc
Merge remote-tracking branch 'origin/develop' into wip/laravel-6
Feb 3, 2020
5e49161
Revert Laravel Dusk changes (#4919)
Feb 7, 2020
1b8f0cc
Fix autoload map for tests
Feb 13, 2020
28eafd9
Install RainLab Dusk plugin for browser tests
Feb 13, 2020
cb061fe
Remove Dusk from dev dependencies
Feb 13, 2020
b78909d
Install Dusk plugin before getting Composer deps
Feb 13, 2020
1f30cf5
Enable Composer scripts for browser tests
Feb 13, 2020
1ac3c71
Install Chrome 78 driver
Feb 13, 2020
a5db9e3
Add new supported filesystems to config
Feb 26, 2020
9911c6b
Add new validation type lang strings.
Feb 26, 2020
cf87f14
Use latest Chrome driver.
Feb 26, 2020
0394494
Merge remote-tracking branch 'origin/develop' into wip/laravel-6
Feb 26, 2020
3591f38
Add `predis` client as default in config
Feb 27, 2020
a2966da
Use October provider for Redis service
Feb 27, 2020
7b00768
Remove local notes support
daftspunk Feb 27, 2020
f7ef665
Set default logging to single, remove dusk config
daftspunk Feb 27, 2020
6e60736
Restore default password setting
daftspunk Feb 27, 2020
9d94271
Remove selenium tests
daftspunk Feb 27, 2020
babf8f0
Restore autoloader and bootstrapper
daftspunk Feb 27, 2020
54b70f6
Update composer to suit latest changes
daftspunk Feb 27, 2020
73b551c
Switch to October Rain assetic
daftspunk Feb 27, 2020
c6e6120
Add roles and updated PHP version to module Composer requirements
Feb 27, 2020
48a8bc3
Minor
daftspunk Feb 27, 2020
8c61985
Merge branch 'develop' into wip/laravel-6
Mar 16, 2020
0c982c2
Use correct folder for getting screenshot artifacts from browser tests
Mar 16, 2020
12c952b
Merge branch 'develop' into wip/laravel-6
LukeTowers Mar 20, 2020
0b10c0e
Remove storage/framework/cache/data directory.
LukeTowers Mar 20, 2020
f98c71a
Replace Illuminate Dumper with Symfony Dumper (#4998)
datune Mar 24, 2020
ef606c7
Merge branch 'develop' into wip/laravel-6
bennothommo Mar 27, 2020
82238ba
Fix for Laravel 6 upgrade
LukeTowers Mar 27, 2020
98a2fb1
Merge remote-tracking branch 'origin/develop' into wip/laravel-6
bennothommo Mar 29, 2020
64ba17e
Drop assertContains calls in OctoberEnv test
bennothommo Mar 29, 2020
822e6d2
Drop browser tests from test suite
bennothommo Mar 29, 2020
17fd8b5
Add info about RainLab Dusk for functional testing
bennothommo Mar 29, 2020
e515791
Fix PHPUnit location
bennothommo Mar 29, 2020
d18f78b
Minor path fix
LukeTowers Mar 29, 2020
79f0a94
Merge branch 'develop' into wip/laravel-6
LukeTowers Mar 31, 2020
ff02e59
Merge branch 'develop' into wip/laravel-6
LukeTowers Mar 31, 2020
8328098
Switch to using league/csv >= 9.1
LukeTowers Mar 31, 2020
8c7d50a
Remove leftover code
LukeTowers Mar 31, 2020
44cc5d3
Merge branch 'develop' into wip/laravel-6
LukeTowers Apr 4, 2020
4b22d06
Merge branch 'develop' into wip/laravel-6
LukeTowers Apr 4, 2020
3ca80f7
Merge branch 'develop' into wip/laravel-6
LukeTowers Apr 5, 2020
9574e2d
Merge branch 'develop' into wip/laravel-6
LukeTowers Apr 5, 2020
6a6331b
Merge branch 'develop' into wip/laravel-6
LukeTowers Apr 8, 2020
3720af4
Make ImportModel compatible with League/CSV v9
bennothommo Apr 17, 2020
28e8758
Further compat fixes
bennothommo Apr 17, 2020
e78d5fe
Merge branch 'develop' into wip/laravel-6
LukeTowers Apr 29, 2020
5c8f567
Merge remote-tracking branch 'origin/develop' into wip/laravel-6
bennothommo May 18, 2020
c3a5780
Update providers and alias to use October Validator service
bennothommo May 19, 2020
3241cf7
Fix deprecated PHPUnit calls in ControllerTest
bennothommo May 19, 2020
908d2f9
Merge branch 'develop' into wip/laravel-6
LukeTowers May 21, 2020
62a4354
Merge branch 'develop' into wip/laravel-6
LukeTowers May 23, 2020
252c9b7
Merge branch 'develop' into wip/laravel-6
LukeTowers May 27, 2020
ec1d8fe
Fix Media Library test for L6
LukeTowers May 27, 2020
ad69711
Merge branch 'develop' into wip/laravel-6
LukeTowers Jun 11, 2020
9c6c6b5
Merge branch 'develop' into wip/laravel-6
LukeTowers Jun 17, 2020
0317ece
Add app.loadDiscoveredPackages config item
bennothommo Jun 23, 2020
47ca69e
Merge remote-tracking branch 'origin/develop' into wip/laravel-6
bennothommo Jun 23, 2020
83137da
Remove Dusk "don't discover" flag
bennothommo Jun 23, 2020
e7b6917
Update config/app.php
LukeTowers Jun 23, 2020
dd8ceaa
Merge branch 'develop' into wip/laravel-6
LukeTowers Jun 28, 2020
9412a2b
Merge remote-tracking branch 'origin/develop' into wip/laravel-6
bennothommo Jul 1, 2020
b5dcc42
Namespace the authentication in tests under 'backend.auth'
bennothommo Jul 1, 2020
4950edc
Add sensitive field input (#5201)
bennothommo Jul 8, 2020
bb3d018
Add fallback alias for Illuminate\Support\Facades\Input
bennothommo Jul 10, 2020
327d7be
Merge remote-tracking branch 'origin/develop' into wip/laravel-6
bennothommo Jul 10, 2020
4fb4e31
Add "develop.allowDeepSymlinks" configuration option.
bennothommo Jul 14, 2020
8fd1ddf
Provide an accessor for the form widget of the Settings controller (#…
bennothommo Jul 15, 2020
d17b6ea
Merge branch 'develop' into wip/laravel-6
LukeTowers Jul 17, 2020
1aab58d
Merge branch 'develop' into wip/laravel-6
LukeTowers Jul 19, 2020
18714ae
Add L6 as a dep to the modules to prevent people with older Laravel v…
LukeTowers Jul 19, 2020
6ea06b3
restore original password min length value
LukeTowers Jul 19, 2020
0dee0e5
Alias Illuminate\Support\Debug\HtmlDumper to Symfony's HtmlDumper
bennothommo Jul 20, 2020
7f7bc04
Merge remote-tracking branch 'origin/develop' into wip/laravel-6
bennothommo Jul 26, 2020
0a9c751
Merge branch 'develop' into wip/laravel-6
LukeTowers Aug 3, 2020
50e61df
Fix path validation for CmsObjects & Assets (#5229)
bennothommo Aug 5, 2020
cbd30af
Merge branch 'develop' into wip/laravel-6
LukeTowers Aug 9, 2020
871c27b
L6 finalizing for merging to develop
LukeTowers Aug 9, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
max-parallel: 6
matrix:
phpVersions: ['7.1', '7.2', '7.3', '7.4']
phpVersions: ['7.2', '7.3', '7.4']
fail-fast: false
name: PHP ${{ matrix.phpVersions }}
steps:
Expand All @@ -26,19 +26,11 @@ jobs:
extension-csv: mbstring, intl, gd, xml, sqlite
- name: Install Composer dependencies
run: composer install --no-interaction --no-progress --no-suggest --no-scripts
- name: Reset October modules and library
run: |
git reset --hard HEAD
rm -rf ./vendor/october/rain
wget https://github.com/octobercms/library/archive/develop.zip -O ./vendor/october/develop.zip
unzip ./vendor/october/develop.zip -d ./vendor/october
mv ./vendor/october/library-develop ./vendor/october/rain
composer dump-autoload
- name: Run post-update Composer scripts
run: |
php artisan october:util set build
php artisan package:discover
- name: Run Linting and Tests
run: |
./vendor/bin/parallel-lint --exclude vendor --exclude storage --exclude tests/fixtures/plugins/testvendor/goto/Plugin.php .
./vendor/bin/phpunit
./vendor/bin/phpunit --prepend ./vendor/october/rain/src/Support/helpers.php
28 changes: 18 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,24 +1,32 @@
/bootstrap/compiled.php
# Composer ignores
/vendor
composer.phar
.DS_Store
.idea
composer.lock

# Framework ignores
.env
.env.*.php
.env.php
selenium.php
/bootstrap/compiled.php
.phpunit.result.cache

# Hosting ignores
php_errors.log
nginx-error.log
nginx-access.log
nginx-ssl.access.log
nginx-ssl.error.log
php-errors.log
sftp-config.json
.ftpconfig
selenium.php
composer.lock
package-lock.json
/node_modules
_ide_helper.php

# for netbeans
# Editor ignores
nbproject
.idea
.vscode
_ide_helper.php

# Other ignores
.DS_Store
package-lock.json
/node_modules
26 changes: 19 additions & 7 deletions artisan
Original file line number Diff line number Diff line change
@@ -1,20 +1,32 @@
#!/usr/bin/env php
<?php

define('LARAVEL_START', microtime(true));

/*
|--------------------------------------------------------------------------
| Register The Auto Loader
| Bootstrap dependencies
|--------------------------------------------------------------------------
|
| Composer provides a convenient, automatically generated class loader
| for our application. We just need to utilize it! We'll require it
| into the script here so that we do not have to worry about the
| loading of any our classes "manually". Feels great to relax.
| We use a custom bootstrap autoloader to load some October dependencies
| first, before bringing in all dependencies from Composer.
|
*/

require __DIR__.'/bootstrap/autoload.php';

/*
|--------------------------------------------------------------------------
| Turn On The Lights
|--------------------------------------------------------------------------
|
| We need to illuminate PHP development, so let us turn on the lights.
| This bootstraps the framework and gets it ready for use, then it
| will load up this application so that we can run it and send
| the responses back to the browser and delight our users.
|
*/

$app = require_once __DIR__.'/bootstrap/app.php';

/*
Expand All @@ -28,7 +40,7 @@ $app = require_once __DIR__.'/bootstrap/app.php';
|
*/

$kernel = $app->make('Illuminate\Contracts\Console\Kernel');
$kernel = $app->make(Illuminate\Contracts\Console\Kernel::class);

$status = $kernel->handle(
$input = new Symfony\Component\Console\Input\ArgvInput,
Expand All @@ -48,4 +60,4 @@ $status = $kernel->handle(

$kernel->terminate($input, $status);

exit($status);
exit($status);
19 changes: 0 additions & 19 deletions bootstrap/autoload.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

define('LARAVEL_START', microtime(true));

/*
|--------------------------------------------------------------------------
| Register Core Helpers
Expand Down Expand Up @@ -35,20 +33,3 @@
*/

require __DIR__.'/../vendor/autoload.php';

/*
|--------------------------------------------------------------------------
| Include The Compiled Class File
|--------------------------------------------------------------------------
|
| To dramatically increase your application's performance, you may use a
| compiled class file which contains all of the classes commonly used
| by a request. The Artisan "optimize" is used to create this file.
|
*/

$compiledPath = __DIR__.'/../storage/framework/compiled.php';

if (file_exists($compiledPath)) {
require $compiledPath;
}
23 changes: 9 additions & 14 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,19 @@
"source": "https://github.com/octobercms/october"
},
"require": {
"php": ">=7.0.8",
"php": "^7.2",
"ext-mbstring": "*",
"ext-openssl": "*",
"october/rain": "~1.0",
"october/system": "~1.0",
"october/backend": "~1.0",
"october/cms": "~1.0",
"laravel/framework": "^5.5.40",
"october/rain": "dev-wip/laravel-6",
"laravel/framework": "^6.0",
"wikimedia/composer-merge-plugin": "dev-master"
},
"require-dev": {
"fzaninotto/faker": "~1.7",
"phpunit/phpunit": "~6.5",
"phpunit/phpunit-selenium": "~1.2",
"meyfa/phpunit-assert-gd": "1.1.0",
"fzaninotto/faker": "^1.9",
"phpunit/phpunit": "^8.0|^9.0",
"phpunit/phpunit-selenium": "dev-master",
"dms/phpunit-arraysubset-asserts": "^0.1.0",
"meyfa/phpunit-assert-gd": "^2.0",
"squizlabs/php_codesniffer": "3.*",
"jakub-onderka/php-parallel-lint": "^1.0"
},
Expand All @@ -69,10 +67,7 @@
]
},
"config": {
"preferred-install": "dist",
"platform": {
"php": "7.0.8"
}
"preferred-install": "dist"
},
"minimum-stability": "dev",
"prefer-stable": true,
Expand Down
15 changes: 0 additions & 15 deletions config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,21 +105,6 @@

'cipher' => 'AES-256-CBC',

/*
|--------------------------------------------------------------------------
| Logging Configuration
|--------------------------------------------------------------------------
|
| Here you may configure the log settings for your application. Out of
| the box, Laravel uses the Monolog PHP logging library. This gives
| you a variety of powerful log handlers / formatters to utilize.
|
| Available Settings: "single", "daily", "syslog", "errorlog"
|
*/

'log' => 'single',

/*
|--------------------------------------------------------------------------
| Autoloaded Service Providers
Expand Down
52 changes: 52 additions & 0 deletions config/hashing.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?php

return [

/*
|--------------------------------------------------------------------------
| Default Hash Driver
|--------------------------------------------------------------------------
|
| This option controls the default hash driver that will be used to hash
| passwords for your application. By default, the bcrypt algorithm is
| used; however, you remain free to modify this option if you wish.
|
| Supported: "bcrypt", "argon", "argon2id"
|
*/

'driver' => 'bcrypt',

/*
|--------------------------------------------------------------------------
| Bcrypt Options
|--------------------------------------------------------------------------
|
| Here you may specify the configuration options that should be used when
| passwords are hashed using the Bcrypt algorithm. This will allow you
| to control the amount of time it takes to hash the given password.
|
*/

'bcrypt' => [
'rounds' => env('BCRYPT_ROUNDS', 10),
],

/*
|--------------------------------------------------------------------------
| Argon Options
|--------------------------------------------------------------------------
|
| Here you may specify the configuration options that should be used when
| passwords are hashed using the Argon algorithm. These will allow you
| to control the amount of time it takes to hash the given password.
|
*/

'argon' => [
'memory' => 1024,
'threads' => 2,
'time' => 2,
],

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

use Monolog\Handler\StreamHandler;
use Monolog\Handler\SyslogUdpHandler;

return [

/*
|--------------------------------------------------------------------------
| Default Log Channel
|--------------------------------------------------------------------------
|
| This option defines the default log channel that gets used when writing
| messages to the logs. The name specified in this option should match
| one of the channels defined in the "channels" configuration array.
|
*/

'default' => env('LOG_CHANNEL', 'stack'),

/*
|--------------------------------------------------------------------------
| Log Channels
|--------------------------------------------------------------------------
|
| Here you may configure the log channels for your application. Out of
| the box, Laravel uses the Monolog PHP logging library. This gives
| you a variety of powerful log handlers / formatters to utilize.
|
| Available Drivers: "single", "daily", "slack", "syslog",
| "errorlog", "monolog",
| "custom", "stack"
|
*/

'channels' => [
'stack' => [
'driver' => 'stack',
'channels' => ['daily'],
'ignore_exceptions' => false,
],

'single' => [
'driver' => 'single',
'path' => storage_path('logs/laravel.log'),
'level' => 'debug',
],

'daily' => [
'driver' => 'daily',
'path' => storage_path('logs/laravel.log'),
'level' => 'debug',
'days' => 14,
],

'slack' => [
'driver' => 'slack',
'url' => env('LOG_SLACK_WEBHOOK_URL'),
'username' => 'Laravel Log',
'emoji' => ':boom:',
'level' => 'critical',
],

'papertrail' => [
'driver' => 'monolog',
'level' => 'debug',
'handler' => SyslogUdpHandler::class,
'handler_with' => [
'host' => env('PAPERTRAIL_URL'),
'port' => env('PAPERTRAIL_PORT'),
],
],

'stderr' => [
'driver' => 'monolog',
'handler' => StreamHandler::class,
'formatter' => env('LOG_STDERR_FORMATTER'),
'with' => [
'stream' => 'php://stderr',
],
],

'syslog' => [
'driver' => 'syslog',
'level' => 'debug',
],

'errorlog' => [
'driver' => 'errorlog',
'level' => 'debug',
],
],

];
Loading