-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: bump to PHP 7.2 and MVC v3 components
This patch bumps the minimum supported PHP version to PHP 7.2, and the various MVC components to the very latest stable versions (notably, v3 for laminas-mvc, laminas-eventmanager, and laminas-servicemanager). As part of the bump, this also adopts the v2 version of laminas-coding-standard.
- Loading branch information
1 parent
cbf5078
commit 04bfd7f
Showing
19 changed files
with
249 additions
and
304 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
.phpcs-cache | ||
.phpunit.result.cache | ||
composer.lock | ||
vendor/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,20 @@ | ||
<?xml version="1.0"?> | ||
<ruleset name="Zend Framework coding standard"> | ||
<rule ref="./vendor/laminas/laminas-coding-standard/ruleset.xml"/> | ||
<ruleset | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="vendor/squizlabs/php_codesniffer/phpcs.xsd"> | ||
|
||
<arg name="basepath" value="." /> | ||
<arg name="cache" value=".phpcs-cache" /> | ||
<arg name="colors" /> | ||
<arg name="extensions" value="php" /> | ||
<arg name="parallel" value="80" /> | ||
|
||
<!-- Show progress --> | ||
<arg value="p" /> | ||
|
||
<!-- Paths to check --> | ||
<file>src</file> | ||
<file>test</file> | ||
|
||
<rule ref="LaminasCodingStandard"/> | ||
</ruleset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
|
||
/** | ||
* @link https://github.com/weierophinney/PhlySimplePage for the canonical source repository | ||
* @copyright Copyright (c) 2012-2020 Matthew Weier O'Phinney (https://mwop.net) | ||
* @license https://github.com/weierophinney/PhlySimplePage/blog/master/LICENSE.md New BSD License | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace PhlySimplePage; | ||
|
||
use Laminas\Cache\Storage\Adapter\AbstractAdapter; | ||
use Laminas\Cache\StorageFactory; | ||
use Laminas\ServiceManager\Exception; | ||
use Psr\Container\ContainerInterface; | ||
|
||
use function sprintf; | ||
|
||
class PageCacheFactory | ||
{ | ||
/** | ||
* Create and return cache storage adapter | ||
* | ||
* @throws Exception\ServiceNotCreatedException | ||
*/ | ||
public function __invoke(ContainerInterface $container): AbstractAdapter | ||
{ | ||
$config = $container->get('config')['phly-simple-page'] ?? []; | ||
if (! isset($config['cache'])) { | ||
throw new Exception\ServiceNotCreatedException(sprintf( | ||
'%s could not create a cache storage adapter, as the ["phly-simple-page"]["cache"]' | ||
. ' key is missing', | ||
self::class | ||
)); | ||
} | ||
|
||
return StorageFactory::factory($config['cache']); | ||
} | ||
} |
Oops, something went wrong.