Skip to content

Commit b899010

Browse files
committed
Update to latest dependencies
1 parent 5303e94 commit b899010

19 files changed

+147
-282
lines changed

Diff for: .env.dist

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ DB_DATABASE=""
66
# Database Connection Info
77
DB_HOSTNAME=127.0.0.1
88
DB_CHARSET=utf8mb4
9+
DB_COLLATION=utf8mb4_0900_ai_ci
910

1011
# Declare the Concrete environment (This makes /application/config/"live".database.php work)
1112
CONCRETE5_ENV="live"

Diff for: .travis.yml

-14
This file was deleted.

Diff for: composer.json

+16-12
Original file line numberDiff line numberDiff line change
@@ -18,26 +18,27 @@
1818
}
1919
},
2020
"require": {
21-
"composer/installers": "^1.3",
22-
"concrete5/core": "^9.1",
23-
"concretecms/dependency-patches": "^1.4.0",
24-
"vlucas/phpdotenv": "^2.4",
25-
"doctrine/orm": "2.13.*"
21+
"composer/installers": "^2.2",
22+
"concrete5/core": "^9.2",
23+
"concretecms/dependency-patches": "^1.7",
24+
"symfony/dotenv": "^5|^6|^7"
2625
},
2726
"require-dev": {
28-
"phpunit/phpunit": "~4.3|^8.0",
29-
"mockery/mockery": "^0.9.9|^1.2"
27+
"mockery/mockery": "^1",
28+
"pestphp/pest": "^1.23"
3029
},
3130
"config": {
32-
"preferred-install": "dist"
31+
"preferred-install": "dist",
32+
"allow-plugins": {
33+
"composer/installers": true,
34+
"mlocati/composer-patcher": true,
35+
"pestphp/pest-plugin": true
36+
}
3337
},
3438
"extra": {
3539
"allow-subpatches": [
3640
"concretecms/dependency-patches"
3741
],
38-
"branch-alias": {
39-
"dev-8.x": "8.x-dev"
40-
},
4142
"installer-paths": {
4243
"public/concrete": ["type:concrete5-core"],
4344
"public/application/themes/{$name}": ["type:concrete5-theme"],
@@ -46,6 +47,9 @@
4647
}
4748
},
4849
"scripts": {
49-
"test": "phpunit"
50+
"test:unit": "pest",
51+
"test": [
52+
"@test:unit"
53+
]
5054
}
5155
}

Diff for: package.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"scripts": {
3-
"dev": "cross-env NODE_ENV=development webpack --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
4-
"watch": "cross-env NODE_ENV=development webpack --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
5-
"hot": "cross-env NODE_ENV=development webpack-dev-server --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
6-
"prod": "cross-env NODE_ENV=production webpack --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
3+
"dev": "mix",
4+
"watch": "mix watch",
5+
"watch-poll": "mix watch -- --watch-options-poll=1000",
6+
"hot": "mix watch --hot",
7+
"prod": "mix --production"
78
},
89
"devDependencies": {
9-
"cross-env": "^7.0.2",
10-
"laravel-mix": "^4.1.4"
10+
"laravel-mix": "^6.0.49"
1111
}
1212
}

Diff for: phpunit.xml.dist

+12-22
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,19 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit bootstrap="tests/bootstrap.php"
3-
backupGlobals="false"
4-
backupStaticAttributes="false"
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
4+
bootstrap="tests/bootstrap.php"
55
colors="true"
6-
verbose="true"
7-
convertErrorsToExceptions="true"
8-
convertNoticesToExceptions="true"
9-
convertWarningsToExceptions="true"
10-
processIsolation="false"
11-
stopOnFailure="false">
6+
>
127
<testsuites>
13-
<testsuite name="Project Test Suite">
14-
<directory>tests</directory>
8+
<testsuite name="Test Suite">
9+
<directory suffix="Test.php">./tests</directory>
1510
</testsuite>
1611
</testsuites>
17-
<filter>
18-
<whitelist>
12+
<coverage processUncoveredFiles="true">
13+
<include>
1914
<directory suffix=".php">application/controllers</directory>
15+
<directory suffix=".php">application/src</directory>
2016
<directory suffix=".php">src</directory>
21-
</whitelist>
22-
</filter>
23-
<logging>
24-
<log type="junit" target="build/report.junit.xml"/>
25-
<log type="coverage-html" target="build/coverage"/>
26-
<log type="coverage-text" target="build/coverage.txt"/>
27-
<log type="coverage-clover" target="build/logs/clover.xml"/>
28-
</logging>
29-
</phpunit>
17+
</include>
18+
</coverage>
19+
</phpunit>

Diff for: public/application/bootstrap/app.php

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
<?php
2+
/* @var Concrete\Core\Application\Application $app */
3+
/* @var Concrete\Core\Console\Application $console only set in CLI environment */
24

35
/*
46
* ----------------------------------------------------------------------------
@@ -8,16 +10,17 @@
810
*
911
* ## Set a theme by route:
1012
*
11-
* Route::setThemeByRoute('/login', 'greek_yogurt');
13+
* $app->make('\Concrete\Core\Page\Theme\ThemeRouteCollection')
14+
* ->setThemeByRoute('/login', 'greek_yogurt');
1215
*
1316
*
1417
* ## Register a class override.
1518
*
16-
* Core::bind('helper/feed', function() {
19+
* $app->bind('helper/feed', function() {
1720
* return new \Application\Core\CustomFeedHelper();
1821
* });
1922
*
20-
* Core::bind('\Concrete\Attribute\Boolean\Controller', function($app, $params) {
23+
* $app->bind('\Concrete\Attribute\Boolean\Controller', function($app, $params) {
2124
* return new \Application\Attribute\Boolean\Controller($params[0]);
2225
* });
2326
*
@@ -62,4 +65,4 @@
6265
* );
6366
*
6467
* ----------------------------------------------------------------------------
65-
*/
68+
*/

Diff for: public/application/bootstrap/autoload.php

+4-5
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@
55
require_once __DIR__ . "/../../../vendor/autoload.php";
66

77
# Try loading in environment info
8-
$env = new \Dotenv\Dotenv(__DIR__ . '/../../../');
98
try {
10-
$env->overload();
11-
} catch (\Exception $e) {
12-
// Ignore any errors
9+
(new \Symfony\Component\Dotenv\Dotenv('CONCRETE5_ENV'))
10+
->usePutenv()->loadEnv(__DIR__ . '/../../../.env');
11+
} catch (\Symfony\Component\Dotenv\Exception\PathException $e) {
12+
// Ignore missing file exception
1313
}
1414

1515
# Add the vendor directory to the include path
1616
ini_set('include_path', __DIR__ . "/../../../vendor" . PATH_SEPARATOR . get_include_path());
17-

Diff for: public/application/config/app.php

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?php
2+
3+
return [
4+
];

Diff for: public/application/config/live.database.php

+6-5
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@
55
'connections' => [
66
'concrete' => [
77
'driver' => 'c5_pdo_mysql',
8-
'server' => getenv('DB_HOSTNAME'),
9-
'database' => getenv('DB_DATABASE'),
10-
'username' => getenv('DB_USERNAME'),
11-
'password' => getenv('DB_PASSWORD'),
12-
'charset' => getenv('DB_CHARSET'),
8+
'server' => $_ENV['DB_HOSTNAME'],
9+
'database' => $_ENV['DB_DATABASE'],
10+
'username' => $_ENV['DB_USERNAME'],
11+
'password' => $_ENV['DB_PASSWORD'],
12+
'character_set' => $_ENV['DB_CHARSET'],
13+
'collation' => $_ENV['DB_COLLATION'],
1314
],
1415
],
1516
];

Diff for: src/Foo/Bar/FooBar.php

-68
This file was deleted.

Diff for: src/helpers.php

+10-6
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use Concrete\Core\Asset\JavascriptAsset;
88
use Illuminate\Support\Str;
99

10-
if (!function_exists(mix::class)) {
10+
if (!function_exists('mix')) {
1111
/**
1212
* Handle loading in laravel mix assets
1313
* This function is useful in development, do:
@@ -72,7 +72,7 @@ function mix($path, $manifestDirectory = __DIR__ . '/../public')
7272
}
7373
}
7474

75-
if (!function_exists(mixAsset::class)) {
75+
if (!function_exists('mixAsset')) {
7676
/**
7777
* Resolve a mix built file and return an Asset instance for it
7878
*
@@ -82,8 +82,12 @@ function mix($path, $manifestDirectory = __DIR__ . '/../public')
8282
*
8383
* @return string
8484
*/
85-
function mixAsset($path, $extension = null, $manifestDirectory = __DIR__ . '/../public')
86-
{
85+
function mixAsset(
86+
string $path,
87+
?string $extension = null,
88+
string $manifestDirectory = __DIR__ . '/../public',
89+
AssetList $assetList = null
90+
) {
8791
// First let's normalize the given directory
8892
$manifestDirectory = realpath($manifestDirectory);
8993
if (!$manifestDirectory || !is_dir($manifestDirectory)) {
@@ -95,7 +99,7 @@ function mixAsset($path, $extension = null, $manifestDirectory = __DIR__ . '/../
9599
$handle = 'mix' . '/' . $manifestDirectory . '/' . $mixPath;
96100

97101
// Handle creating the proper asset type based on the extension
98-
$extension = $extension ?: pathinfo($path, PATHINFO_EXTENSION);
102+
$extension = (string) ($extension ?: pathinfo($path, PATHINFO_EXTENSION));
99103
switch (strtolower($extension)) {
100104
case 'js':
101105
$asset = new JavascriptAsset($handle);
@@ -113,7 +117,7 @@ function mixAsset($path, $extension = null, $manifestDirectory = __DIR__ . '/../
113117

114118
// Register the asset on the way out, we do this so that we can leverage the asset system's ability to load
115119
// dependencies only once per page even if it's required multiple times.
116-
$assetList = AssetList::getInstance();
120+
$assetList = $assetList ?: AssetList::getInstance();
117121
$assetList->registerAsset($asset);
118122

119123
return $asset;

0 commit comments

Comments
 (0)