These are fixes to get Statamic to work on PHP 7.4.
Statamic version: 2.11.15
PHP version: 7.4.0
| diff --git a/statamic/composer.json b/statamic/composer.json | |
| index 24ca07e..a6c3a18 100755 | |
| --- a/statamic/composer.json | |
| +++ b/statamic/composer.json | |
| @@ -16,7 +16,7 @@ | |
| "league/glide-laravel": "^1.0.0", | |
| "mustangostang/spyc": "dev-master#dfd9aadc1f5224065d55b42b712c7e99a50a3f4d", | |
| "laravelcollective/html": "~5.0", | |
| - "michelf/php-markdown": "1.7.0", | |
| + "michelf/php-markdown": "1.9.0", | |
| "michelf/php-smartypants": "dev-lib#c0465c6d4c5ab853c2fa45df6c10bce7e35cc137", | |
| "netcarver/textile": "3.6.*@dev", | |
| "webpatser/laravel-uuid": "1.*", | |
| diff --git a/statamic/composer.lock b/statamic/composer.lock | |
| index 6307ba9..4be3c11 100755 | |
| --- a/statamic/composer.lock | |
| +++ b/statamic/composer.lock | |
| @@ -4,7 +4,7 @@ | |
| "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", | |
| "This file is @generated automatically" | |
| ], | |
| - "content-hash": "b17f91fa39338980c1f7aaa28f1e98e8", | |
| + "content-hash": "4da64f7cb1383cc857db1f6c6bd4e783", | |
| "packages": [ | |
| { | |
| "name": "algolia/algoliasearch-client-php", | |
| @@ -418,8 +418,7 @@ | |
| "dist": { | |
| "type": "path", | |
| "url": "../site/addons/PowerTools", | |
| - "reference": "17bbcfee6af03b630bc66bbe52e897d1edc0a6cc", | |
| - "shasum": null | |
| + "reference": "17bbcfee6af03b630bc66bbe52e897d1edc0a6cc" | |
| }, | |
| "require": { | |
| "rap2hpoutre/laravel-log-viewer": "*" | |
| @@ -1702,30 +1701,28 @@ | |
| }, | |
| { | |
| "name": "michelf/php-markdown", | |
| - "version": "1.7.0", | |
| + "version": "1.9.0", | |
| "source": { | |
| "type": "git", | |
| "url": "https://github.com/michelf/php-markdown.git", | |
| - "reference": "1f51cc520948f66cd2af8cbc45a5ee175e774220" | |
| + "reference": "c83178d49e372ca967d1a8c77ae4e051b3a3c75c" | |
| }, | |
| "dist": { | |
| "type": "zip", | |
| - "url": "https://api.github.com/repos/michelf/php-markdown/zipball/1f51cc520948f66cd2af8cbc45a5ee175e774220", | |
| - "reference": "1f51cc520948f66cd2af8cbc45a5ee175e774220", | |
| + "url": "https://api.github.com/repos/michelf/php-markdown/zipball/c83178d49e372ca967d1a8c77ae4e051b3a3c75c", | |
| + "reference": "c83178d49e372ca967d1a8c77ae4e051b3a3c75c", | |
| "shasum": "" | |
| }, | |
| "require": { | |
| "php": ">=5.3.0" | |
| }, | |
| - "type": "library", | |
| - "extra": { | |
| - "branch-alias": { | |
| - "dev-lib": "1.4.x-dev" | |
| - } | |
| + "require-dev": { | |
| + "phpunit/phpunit": ">=4.3 <5.8" | |
| }, | |
| + "type": "library", | |
| "autoload": { | |
| - "psr-0": { | |
| - "Michelf": "" | |
| + "psr-4": { | |
| + "Michelf\\": "Michelf/" | |
| } | |
| }, | |
| "notification-url": "https://packagist.org/downloads/", | |
| @@ -1749,7 +1746,7 @@ | |
| "keywords": [ | |
| "markdown" | |
| ], | |
| - "time": "2016-10-29T18:58:20+00:00" | |
| + "time": "2019-12-02T02:32:27+00:00" | |
| }, | |
| { | |
| "name": "michelf/php-smartypants", |
| diff --git a/statamic/bundles/Nav/NavTags.php b/statamic/bundles/Nav/NavTags.php | |
| index b4cda69..646a0bb 100755 | |
| --- a/statamic/bundles/Nav/NavTags.php | |
| +++ b/statamic/bundles/Nav/NavTags.php | |
| @@ -145,7 +145,7 @@ class NavTags extends Tags | |
| // Create crumbs from segments | |
| $segment_urls = []; | |
| for ($i = 1; $i <= $segment_count; $i++) { | |
| - $segment_urls[] = URL::tidy(join($segments, '/')); | |
| + $segment_urls[] = URL::tidy(join('/', $segments)); | |
| array_pop($segments); | |
| } | |
| diff --git a/statamic/bundles/Parent/ParentTags.php b/statamic/bundles/Parent/ParentTags.php | |
| index 57400a6..5256810 100755 | |
| --- a/statamic/bundles/Parent/ParentTags.php | |
| +++ b/statamic/bundles/Parent/ParentTags.php | |
| @@ -84,7 +84,7 @@ class ParentTags extends Tags | |
| // Create crumbs from segments | |
| $segment_urls = []; | |
| for ($i = 1; $i <= $segment_count; $i++) { | |
| - $segment_urls[] = URL::tidy(join($segments, '/')); | |
| + $segment_urls[] = URL::tidy(join('/', $segments)); | |
| array_pop($segments); | |
| } | |
| diff --git a/statamic/core/API/Path.php b/statamic/core/API/Path.php | |
| index 0d86229..5a54d41 100755 | |
| --- a/statamic/core/API/Path.php | |
| +++ b/statamic/core/API/Path.php | |
| @@ -134,7 +134,7 @@ class Path | |
| return null; | |
| } | |
| - return self::tidy(join($args, '/')); | |
| + return self::tidy(join('/', $args)); | |
| } | |
| /** | |
| diff --git a/statamic/core/Extend/Tags.php b/statamic/core/Extend/Tags.php | |
| index 5d02186..2410422 100755 | |
| --- a/statamic/core/Extend/Tags.php | |
| +++ b/statamic/core/Extend/Tags.php | |
| @@ -226,7 +226,7 @@ abstract class Tags | |
| $bits = explode(':', $attr); | |
| $param = array_shift($bits); | |
| - $attr_str .= $param . '="' . implode($bits, ': ') . '" '; | |
| + $attr_str .= $param . '="' . implode(': ', $bits) . '" '; | |
| } | |
| } | |