From de10f4f16358161ff541bbc6dc0db870c15496de Mon Sep 17 00:00:00 2001 From: Awilum Date: Fri, 25 Dec 2020 15:53:34 +0300 Subject: [PATCH 01/32] fix(core): fix issue with Rest API endpoints detection. #522 BREAKING CHANGES - method isApiRequest() removed. --- src/flextype/Foundation/Flextype.php | 10 ---------- src/flextype/bootstrap.php | 20 +++++++++++--------- 2 files changed, 11 insertions(+), 19 deletions(-) diff --git a/src/flextype/Foundation/Flextype.php b/src/flextype/Foundation/Flextype.php index 8afd92c8..36d79678 100644 --- a/src/flextype/Foundation/Flextype.php +++ b/src/flextype/Foundation/Flextype.php @@ -88,16 +88,6 @@ final class Flextype extends App return self::$instances[$cls]; } - /** - * Determine API Request - * - * @return bool - */ - public function isApiRequest(): bool - { - return explode('/', Uri::createFromEnvironment(new Environment($_SERVER))->getPath())[0] === 'api'; - } - /** * Returns the current Flextype version */ diff --git a/src/flextype/bootstrap.php b/src/flextype/bootstrap.php index e679d8cf..4cf5f2cf 100755 --- a/src/flextype/bootstrap.php +++ b/src/flextype/bootstrap.php @@ -57,7 +57,6 @@ $flextype = Flextype::getInstance([ ], ]); - /** * Display Errors */ @@ -172,14 +171,12 @@ flextype('plugins')->init(); /** * Include API ENDPOINTS */ -if (flextype()->isApiRequest()) { - include_once ROOT_DIR . '/src/flextype/Endpoints/Utils/errors.php'; - include_once ROOT_DIR . '/src/flextype/Endpoints/Utils/access.php'; - include_once ROOT_DIR . '/src/flextype/Endpoints/entries.php'; - include_once ROOT_DIR . '/src/flextype/Endpoints/registry.php'; - include_once ROOT_DIR . '/src/flextype/Endpoints/media.php'; - include_once ROOT_DIR . '/src/flextype/Endpoints/images.php'; -} +include_once ROOT_DIR . '/src/flextype/Endpoints/Utils/errors.php'; +include_once ROOT_DIR . '/src/flextype/Endpoints/Utils/access.php'; +include_once ROOT_DIR . '/src/flextype/Endpoints/entries.php'; +include_once ROOT_DIR . '/src/flextype/Endpoints/registry.php'; +include_once ROOT_DIR . '/src/flextype/Endpoints/media.php'; +include_once ROOT_DIR . '/src/flextype/Endpoints/images.php'; /** * Enable lazy CORS @@ -190,6 +187,11 @@ if (flextype()->isApiRequest()) { */ flextype('cors')->init(); +/** + * Run high priority event: onFlextypeBeforeRun before Flextype Application starts. + */ +flextype('emitter')->emit('onFlextypeBeforeRun'); + /** * Run application */ From 12d8a6a8a796ac24b0e11cbee49dd86b1441f568 Mon Sep 17 00:00:00 2001 From: Awilum Date: Sun, 27 Dec 2020 15:04:12 +0300 Subject: [PATCH 02/32] feat(plugins): set default plugin priority 1000 #523 --- src/flextype/Foundation/Plugins.php | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/flextype/Foundation/Plugins.php b/src/flextype/Foundation/Plugins.php index 15544ad0..ae418a4e 100755 --- a/src/flextype/Foundation/Plugins.php +++ b/src/flextype/Foundation/Plugins.php @@ -151,8 +151,8 @@ class Plugins // Check if is not set plugin priority if (! isset($plugins[$plugin['dirname']]['settings']['priority'])) { - // Set default plugin priority = 100 - $plugins[$plugin['dirname']]['settings']['priority'] = 100; + // Set default plugin priority = 1000 + $plugins[$plugin['dirname']]['settings']['priority'] = 1000; } // Set tmp _priority field for sorting @@ -378,7 +378,17 @@ class Plugins continue; } - include_once PATH['project'] . '/plugins/' . $pluginName . '/bootstrap.php'; + include PATH['project'] . '/plugins/' . $pluginName . '/bootstrap.php'; + + //spl_autoload_register(function ($pluginName) { + // include PATH['project'] . '/plugins/' . $pluginName . '/bootstrap.php'; + //}); + } + + //dd(get_declared_classes()); + + + } } From 82bc127f87ae5ecc68f1b2ead5d42a5e469268f7 Mon Sep 17 00:00:00 2001 From: Awilum Date: Sun, 27 Dec 2020 15:05:54 +0300 Subject: [PATCH 03/32] feat(plugins): set default plugin priority 1000 #523 --- src/flextype/Foundation/Plugins.php | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/flextype/Foundation/Plugins.php b/src/flextype/Foundation/Plugins.php index ae418a4e..74f82699 100755 --- a/src/flextype/Foundation/Plugins.php +++ b/src/flextype/Foundation/Plugins.php @@ -378,17 +378,7 @@ class Plugins continue; } - include PATH['project'] . '/plugins/' . $pluginName . '/bootstrap.php'; - - //spl_autoload_register(function ($pluginName) { - // include PATH['project'] . '/plugins/' . $pluginName . '/bootstrap.php'; - //}); - + include_once PATH['project'] . '/plugins/' . $pluginName . '/bootstrap.php'; } - - //dd(get_declared_classes()); - - - } } From b4c842f4f4f732ac5390d9f7fad3f62e8b8b7646 Mon Sep 17 00:00:00 2001 From: Awilum Date: Sun, 27 Dec 2020 16:58:50 +0300 Subject: [PATCH 04/32] feat(plugins): set default plugin priority 100 #523 --- src/flextype/Foundation/Plugins.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/flextype/Foundation/Plugins.php b/src/flextype/Foundation/Plugins.php index 74f82699..f5163eaf 100755 --- a/src/flextype/Foundation/Plugins.php +++ b/src/flextype/Foundation/Plugins.php @@ -95,7 +95,7 @@ class Plugins } } else { // Init plugin configs - $plugins = []; + $plugins = []; $defaultPluginSettings = []; $projectPluginSettings = []; $defaultPluginManifest = []; @@ -121,7 +121,7 @@ class Plugins } // Get default plugin settings content - $defaultPluginSettingsFileContent = filesystem()->file($defaultPluginSettingsFile)->get(); + $defaultPluginSettingsFileContent = filesystem()->file($defaultPluginSettingsFile)->get(); $defaultPluginSettings = flextype('serializers')->yaml()->decode($defaultPluginSettingsFileContent); // Create project plugin settings file @@ -142,7 +142,7 @@ class Plugins } // Get default plugin manifest content - $defaultPluginManifestFileContent = filesystem()->file($defaultPluginManifestFile)->get(); + $defaultPluginManifestFileContent = filesystem()->file($defaultPluginManifestFile)->get(); $defaultPluginManifest = flextype('serializers')->yaml()->decode($defaultPluginManifestFileContent); // Merge plugin settings and manifest data @@ -151,8 +151,8 @@ class Plugins // Check if is not set plugin priority if (! isset($plugins[$plugin['dirname']]['settings']['priority'])) { - // Set default plugin priority = 1000 - $plugins[$plugin['dirname']]['settings']['priority'] = 1000; + // Set default plugin priority = 100 + $plugins[$plugin['dirname']]['settings']['priority'] = 100; } // Set tmp _priority field for sorting @@ -160,7 +160,7 @@ class Plugins } // Sort plugins list by priority. - $plugins = arrays($plugins)->sortBy('_priority', 'DESC')->toArray(); + $plugins = arrays($plugins)->sortBy('_priority', 'ASC')->toArray(); // ... and delete tmp _priority field for sorting foreach ($plugins as $pluginName => $pluginData) { From 16fa2bf28cf91d06878957fdc83759f26b8a1d64 Mon Sep 17 00:00:00 2001 From: Awilum Date: Sun, 27 Dec 2020 18:25:37 +0300 Subject: [PATCH 05/32] feat(core): Moving to PHP 7.4.0 #524 --- .github/workflows/tests.yml | 2 +- README.md | 2 +- composer.json | 2 +- index.php | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index af717269..0e962caa 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -7,7 +7,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - php: ['7.3', '7.4', '8.0'] + php: ['7.4', '8.0'] dependency-version: [prefer-stable] steps: diff --git a/README.md b/README.md index bb57085e..c8dc1892 100755 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ The underlying architecture of Flextype is built using well established and best Make sure your server meets the following requirements. * Webserver (Apache with Mod Rewrite) -* PHP 7.3.0 or higher +* PHP 7.4.0 or higher #### PHP EXTENSIONS Flextype needs the following PHP extensions to be enabled: diff --git a/composer.json b/composer.json index 499c220e..8d9dc155 100755 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ "issues": "https://github.com/flextype/flextype/issues" }, "require": { - "php": "^7.3 || ^8.0", + "php": "^7.4 || ^8.0", "ext-json": "*", "ext-dom": "*", "ext-spl": "*", diff --git a/index.php b/index.php index 14b9a206..5fd44cba 100755 --- a/index.php +++ b/index.php @@ -21,7 +21,7 @@ use const PHP_VERSION; /** * Define the application minimum supported PHP version. */ -define('FLEXTYPE_MINIMUM_PHP', '7.3.0'); +define('FLEXTYPE_MINIMUM_PHP', '7.4.0'); /** * Define the PATH to the root directory (without trailing slash). @@ -32,8 +32,8 @@ define('ROOT_DIR', str_replace(DIRECTORY_SEPARATOR, '/', getcwd())); * Define the PATH (without trailing slash). */ define('PATH', [ - 'project' => ROOT_DIR . '/project', - 'tmp' => ROOT_DIR . '/var/tmp', + 'project' => ROOT_DIR . '/project', + 'tmp' => ROOT_DIR . '/var/tmp', ]); /** From 1e981dc058448c8317f226777e7db9e874881512 Mon Sep 17 00:00:00 2001 From: Awilum Date: Sun, 27 Dec 2020 18:59:16 +0300 Subject: [PATCH 06/32] feat(core): Moving to PHP 7.4.0 #524 --- src/flextype/dependencies.php | 40 +++++++++-------------------------- 1 file changed, 10 insertions(+), 30 deletions(-) diff --git a/src/flextype/dependencies.php b/src/flextype/dependencies.php index 177c753f..05d72754 100644 --- a/src/flextype/dependencies.php +++ b/src/flextype/dependencies.php @@ -54,23 +54,17 @@ use function sys_get_temp_dir; /** * Create a standard session hanndler */ -flextype()->container()['session'] = static function () { - return new Session(); -}; +flextype()->container()['session'] = fn() => new Session(); /** * Supply a custom callable resolver, which resolves PSR-15 middlewares. */ -flextype()->container()['callableResolver'] = static function () { - return new CallableResolver(flextype()->container()); -}; +flextype()->container()['callableResolver'] = fn() => new CallableResolver(flextype()->container()); /** * Add registry service to Flextype container */ -flextype()->container()['registry'] = static function () use ($registry) { - return $registry; -}; +flextype()->container()['registry'] = $registry; /** * Add logger service to Flextype container @@ -85,9 +79,7 @@ flextype()->container()['logger'] = static function () { /** * Add emitter service to Flextype container */ -flextype()->container()['emitter'] = static function () { - return new Emitter(); -}; +flextype()->container()['emitter'] = fn() => new Emitter(); /** * Add slugify service to Flextype container @@ -216,16 +208,12 @@ flextype()->container()['cache'] = static function () { /** * Add parsers service to Flextype container */ -flextype()->container()['parsers'] = static function () { - return new Parsers(); -}; +flextype()->container()['parsers'] = fn() => new Parsers(); /** * Add serializer service to Flextype container */ -flextype()->container()['serializers'] = static function () { - return new Serializers(); -}; +flextype()->container()['serializers'] = fn() => new Serializers(); /** * Add images service to Flextype container @@ -285,27 +273,19 @@ flextype()->container()['images'] = static function () { /** * Add entries service to Flextype container */ -flextype()->container()['entries'] = static function () { - return new Entries(); -}; +flextype()->container()['entries'] = fn() => new Entries(); /** * Add media service to Flextype container */ -flextype()->container()['media'] = static function () { - return new Media(); -}; +flextype()->container()['media'] = fn() => new Media(); /** * Add plugins service to Flextype container */ -flextype()->container()['plugins'] = static function () { - return new Plugins(); -}; +flextype()->container()['plugins'] = fn() => new Plugins(); /** * Add cors service to Flextype container */ -flextype()->container()['cors'] = static function () { - return new Cors(); -}; +flextype()->container()['cors'] = fn() => new Cors(); From 6b6812aa00cba6a9f3ce65b928b7620f9a42ec96 Mon Sep 17 00:00:00 2001 From: Awilum Date: Sun, 27 Dec 2020 19:35:22 +0300 Subject: [PATCH 07/32] feat(core): Moving to PHP 7.4.0 #524 --- src/flextype/Foundation/Entries/Entries.php | 2 +- src/flextype/Foundation/Flextype.php | 2 +- src/flextype/Foundation/Plugins.php | 2 +- src/flextype/preflight.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/flextype/Foundation/Entries/Entries.php b/src/flextype/Foundation/Entries/Entries.php index 3c38eb41..fa7add06 100755 --- a/src/flextype/Foundation/Entries/Entries.php +++ b/src/flextype/Foundation/Entries/Entries.php @@ -33,7 +33,7 @@ class Entries * @var array * @access private */ - private $storage = [ + private array $storage = [ 'fetch' => [ 'id' => '', 'data' => [], diff --git a/src/flextype/Foundation/Flextype.php b/src/flextype/Foundation/Flextype.php index 36d79678..6eb81cdf 100644 --- a/src/flextype/Foundation/Flextype.php +++ b/src/flextype/Foundation/Flextype.php @@ -31,7 +31,7 @@ final class Flextype extends App * * @var array */ - private static $instances = []; + private static array $instances = []; /** * Flextype should not be cloneable. diff --git a/src/flextype/Foundation/Plugins.php b/src/flextype/Foundation/Plugins.php index f5163eaf..f4c328bf 100755 --- a/src/flextype/Foundation/Plugins.php +++ b/src/flextype/Foundation/Plugins.php @@ -34,7 +34,7 @@ class Plugins * * @var array */ - private $locales = []; + private array $locales = []; /** * Constructor diff --git a/src/flextype/preflight.php b/src/flextype/preflight.php index bb2bf389..a722e900 100644 --- a/src/flextype/preflight.php +++ b/src/flextype/preflight.php @@ -8,7 +8,7 @@ $flextypeManifestFilePath = ROOT_DIR . '/src/flextype/flextype.yaml'; $defaultFlextypeSettingsFilePath = ROOT_DIR . '/src/flextype/settings.yaml'; $customFlextypeSettingsFilePath = PATH['project'] . '/config/flextype/settings.yaml'; $preflightFlextypePath = PATH['tmp'] . '/preflight/flextype/'; -$customFlextypeSettingsPath = PATH['project'] . '/config/flextype/'; +$customFlextypeSettingsPath = PATH['project'] . '/config/flextype/'; ! filesystem()->directory($preflightFlextypePath)->exists() and filesystem()->directory($preflightFlextypePath)->create(0755, true); ! filesystem()->directory($customFlextypeSettingsPath)->exists() and filesystem()->directory($customFlextypeSettingsPath)->create(0755, true); From 5954d8ebead46d5c499ee2194cc03020ee975437 Mon Sep 17 00:00:00 2001 From: Awilum Date: Sun, 27 Dec 2020 19:56:44 +0300 Subject: [PATCH 08/32] refactor(core): add phpstat.neon config file --- phpstan.neon | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 phpstan.neon diff --git a/phpstan.neon b/phpstan.neon new file mode 100644 index 00000000..3ada963a --- /dev/null +++ b/phpstan.neon @@ -0,0 +1,6 @@ +parameters: + level: 6 + bootstrapFiles: + - index.php + paths: + - src From 57d7c33de61f95119cd52f56a41742359093aa9d Mon Sep 17 00:00:00 2001 From: Awilum Date: Sun, 27 Dec 2020 19:58:17 +0300 Subject: [PATCH 09/32] refactor(endpoints): fix typhint in validate_access_token() --- src/flextype/Endpoints/Utils/access.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/flextype/Endpoints/Utils/access.php b/src/flextype/Endpoints/Utils/access.php index 614c9434..5168f780 100644 --- a/src/flextype/Endpoints/Utils/access.php +++ b/src/flextype/Endpoints/Utils/access.php @@ -14,7 +14,7 @@ use function filesystem; /** * Validate access token */ -function validate_access_token($token): bool +function validate_access_token(string $token): bool { return filesystem()->file(PATH['project'] . '/tokens/access/' . $token . '/token.yaml')->exists(); } From 92d5bc525f0ade363e65f4f230bf3159e3edc61d Mon Sep 17 00:00:00 2001 From: Awilum Date: Sun, 27 Dec 2020 19:58:55 +0300 Subject: [PATCH 10/32] refactor(endpoints): fix typhint in validate_entries_token() --- src/flextype/Endpoints/entries.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/flextype/Endpoints/entries.php b/src/flextype/Endpoints/entries.php index b9812a39..dcf687d9 100644 --- a/src/flextype/Endpoints/entries.php +++ b/src/flextype/Endpoints/entries.php @@ -22,7 +22,7 @@ use function is_array; /** * Validate entries entries token */ -function validate_entries_token($token): bool +function validate_entries_token(string $token): bool { return filesystem()->file(PATH['project'] . '/tokens/entries/' . $token . '/token.yaml')->exists(); } From ceca5a1647d4abee5b9288024d60dc46e773a8e1 Mon Sep 17 00:00:00 2001 From: Awilum Date: Sun, 27 Dec 2020 20:01:19 +0300 Subject: [PATCH 11/32] refactor(endpoints): fix typhint in validate_images_token() --- src/flextype/Endpoints/images.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/flextype/Endpoints/images.php b/src/flextype/Endpoints/images.php index c9d32958..a0d7e771 100644 --- a/src/flextype/Endpoints/images.php +++ b/src/flextype/Endpoints/images.php @@ -19,7 +19,7 @@ use function flextype; /** * Validate images token */ -function validate_images_token($token): bool +function validate_images_token(string $token): bool { return filesystem()->file(PATH['project'] . '/tokens/images/' . $token . '/token.yaml')->exists(); } From acc99c4b28e7ba483160ea6ee34399f131524085 Mon Sep 17 00:00:00 2001 From: Awilum Date: Sun, 27 Dec 2020 20:01:49 +0300 Subject: [PATCH 12/32] refactor(endpoints): fix typhint in validate_registry_token() --- src/flextype/Endpoints/registry.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/flextype/Endpoints/registry.php b/src/flextype/Endpoints/registry.php index 273de334..2be69fd0 100644 --- a/src/flextype/Endpoints/registry.php +++ b/src/flextype/Endpoints/registry.php @@ -19,7 +19,7 @@ use function flextype; /** * Validate registry token */ -function validate_registry_token($token): bool +function validate_registry_token(string $token): bool { return filesystem()->file(PATH['project'] . '/tokens/registry/' . $token . '/token.yaml')->exists(); } From 75ce33bc526f426aa644a4e13d3a422c63ffca17 Mon Sep 17 00:00:00 2001 From: Awilum Date: Sun, 27 Dec 2020 20:02:09 +0300 Subject: [PATCH 13/32] refactor(endpoints): fix typhint in validate_files_token() validate_folders_token() --- src/flextype/Endpoints/media.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/flextype/Endpoints/media.php b/src/flextype/Endpoints/media.php index d9baa30e..73fd98ec 100644 --- a/src/flextype/Endpoints/media.php +++ b/src/flextype/Endpoints/media.php @@ -23,7 +23,7 @@ use function is_dir; /** * Validate files token */ -function validate_files_token($token): bool +function validate_files_token(string $token): bool { return filesystem()->file(PATH['project'] . '/tokens/media/files/' . $token . '/token.yaml')->exists(); } @@ -31,7 +31,7 @@ function validate_files_token($token): bool /** * Validate folders token */ -function validate_folders_token($token): bool +function validate_folders_token(string $token): bool { return filesystem()->file(PATH['project'] . '/tokens/media/folders/' . $token . '/token.yaml')->exists(); } From 2b6d0af338abdce584e03bc2eb59b90c330e8355 Mon Sep 17 00:00:00 2001 From: Awilum Date: Sun, 27 Dec 2020 20:07:26 +0300 Subject: [PATCH 14/32] fix(media-rest-api): fix issue with endpoints saving response count. #525 --- src/flextype/Endpoints/media.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/flextype/Endpoints/media.php b/src/flextype/Endpoints/media.php index 73fd98ec..a2533e8d 100644 --- a/src/flextype/Endpoints/media.php +++ b/src/flextype/Endpoints/media.php @@ -533,7 +533,7 @@ flextype()->delete('/api/media/files', function (Request $request, Response $res $response_code = $delete_file ? 204 : 404; // Update calls counter - filesystem()->file($files_token_file_path)->get(flextype('serializers')->yaml()->encode(array_replace_recursive($files_token_file_data, ['calls' => $files_token_file_data['calls'] + 1]))); + filesystem()->file($files_token_file_path)->put(flextype('serializers')->yaml()->encode(array_replace_recursive($files_token_file_data, ['calls' => $files_token_file_data['calls'] + 1]))); if ($response_code === 404) { // Return response @@ -609,7 +609,7 @@ flextype()->patch('/api/media/files/meta', function (Request $request, Response // Set files and access token file if ( ($files_token_file_data = flextype('serializers')->yaml()->decode(filesystem()->file($files_token_file_path)->get())) && - ($access_token_file_data = flextype('serializers')->yaml()->decode(filesystem()->file($access_token_file_path)->get($access_token_file_path))) + ($access_token_file_data = flextype('serializers')->yaml()->decode(filesystem()->file($access_token_file_path)->get())) ) { if ( $files_token_file_data['state'] === 'disabled' || From be1f12c70025721b56f49d859fc1a7c99495ba37 Mon Sep 17 00:00:00 2001 From: Awilum Date: Sun, 27 Dec 2020 20:52:49 +0300 Subject: [PATCH 15/32] refactor(core): add phpstat.neon config file --- phpstan.neon | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/phpstan.neon b/phpstan.neon index 3ada963a..e6fd563a 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,6 +1,9 @@ parameters: - level: 6 - bootstrapFiles: - - index.php + level: max paths: - src + ignoreErrors: + - '/Constant PATH not found./' + - '/Constant ROOT_DIR not found./' + - '/Variable \$api_errors might not be defined./' + - '/Variable \$registry might not be defined./' From 087a4c5330c1bd682fd1692e7185f1c3de128d51 Mon Sep 17 00:00:00 2001 From: Awilum Date: Sun, 27 Dec 2020 21:58:39 +0300 Subject: [PATCH 16/32] refactor(entries-rest-api): set strict array type for $request->getParsedBody() #527 --- src/flextype/Endpoints/entries.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/flextype/Endpoints/entries.php b/src/flextype/Endpoints/entries.php index dcf687d9..f1d0a767 100644 --- a/src/flextype/Endpoints/entries.php +++ b/src/flextype/Endpoints/entries.php @@ -143,7 +143,7 @@ flextype()->get('/api/entries', function (Request $request, Response $response) */ flextype()->post('/api/entries', function (Request $request, Response $response) use ($api_errors) { // Get Post Data - $post_data = $request->getParsedBody(); + $post_data = (array) $request->getParsedBody(); if (! isset($post_data['token']) || ! isset($post_data['access_token']) || ! isset($post_data['id']) || ! isset($post_data['data'])) { return $response @@ -253,7 +253,7 @@ flextype()->post('/api/entries', function (Request $request, Response $response) */ flextype()->patch('/api/entries', function (Request $request, Response $response) use ($api_errors) { // Get Post Data - $post_data = $request->getParsedBody(); + $post_data = (array) $request->getParsedBody(); if (! isset($post_data['token']) || ! isset($post_data['access_token']) || ! isset($post_data['id']) || ! isset($post_data['data'])) { return $response @@ -363,7 +363,7 @@ flextype()->patch('/api/entries', function (Request $request, Response $response */ flextype()->put('/api/entries', function (Request $request, Response $response) use ($api_errors) { // Get Post Data - $post_data = $request->getParsedBody(); + $post_data = (array) $request->getParsedBody(); if (! isset($post_data['token']) || ! isset($post_data['access_token']) || ! isset($post_data['id']) || ! isset($post_data['new_id'])) { return $response @@ -474,7 +474,7 @@ flextype()->put('/api/entries', function (Request $request, Response $response) */ flextype()->put('/api/entries/copy', function (Request $request, Response $response) use ($api_errors) { // Get Post Data - $post_data = $request->getParsedBody(); + $post_data = (array) $request->getParsedBody(); if (! isset($post_data['token']) || ! isset($post_data['access_token']) || ! isset($post_data['id']) || ! isset($post_data['new_id'])) { return $response @@ -584,7 +584,7 @@ flextype()->put('/api/entries/copy', function (Request $request, Response $respo */ flextype()->delete('/api/entries', function (Request $request, Response $response) use ($api_errors) { // Get Post Data - $post_data = $request->getParsedBody(); + $post_data = (array) $request->getParsedBody(); if (! isset($post_data['token']) || ! isset($post_data['access_token']) || ! isset($post_data['id'])) { return $response From a6a9dcb7b5e7c39a2e2659850091243bcaa82be6 Mon Sep 17 00:00:00 2001 From: Awilum Date: Sun, 27 Dec 2020 21:59:08 +0300 Subject: [PATCH 17/32] refactor(media-rest-api): set strict array type for $request->getParsedBody() #526 --- src/flextype/Endpoints/media.php | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/flextype/Endpoints/media.php b/src/flextype/Endpoints/media.php index a2533e8d..311441cc 100644 --- a/src/flextype/Endpoints/media.php +++ b/src/flextype/Endpoints/media.php @@ -155,7 +155,7 @@ flextype()->get('/api/media/files', function (Request $request, Response $respon */ flextype()->post('/api/media/files', function (Request $request, Response $response) use ($api_errors) { // Get Post Data - $post_data = $request->getParsedBody(); + $post_data = (array) $request->getParsedBody(); if (! isset($post_data['token']) || ! isset($post_data['access_token']) || ! isset($post_data['folder']) || ! isset($_FILES['file'])) { return $response->withStatus($api_errors['0501']['http_status_code']) @@ -265,7 +265,7 @@ flextype()->post('/api/media/files', function (Request $request, Response $respo */ flextype()->put('/api/media/files', function (Request $request, Response $response) use ($api_errors) { // Get Post Data - $post_data = $request->getParsedBody(); + $post_data = (array) $request->getParsedBody(); if (! isset($post_data['token']) || ! isset($post_data['access_token']) || ! isset($post_data['id']) || ! isset($post_data['new_id'])) { return $response->withStatus($api_errors['0501']['http_status_code']) @@ -374,7 +374,7 @@ flextype()->put('/api/media/files', function (Request $request, Response $respon */ flextype()->put('/api/media/files/copy', function (Request $request, Response $response) use ($api_errors) { // Get Post Data - $post_data = $request->getParsedBody(); + $post_data = (array) $request->getParsedBody(); if (! isset($post_data['token']) || ! isset($post_data['access_token']) || ! isset($post_data['id']) || ! isset($post_data['new_id'])) { return $response->withStatus($api_errors['0501']['http_status_code']) @@ -482,7 +482,7 @@ flextype()->put('/api/media/files/copy', function (Request $request, Response $r */ flextype()->delete('/api/media/files', function (Request $request, Response $response) use ($api_errors) { // Get Post Data - $post_data = $request->getParsedBody(); + $post_data = (array) $request->getParsedBody(); if (! isset($post_data['id']) || ! isset($post_data['access_token']) || ! isset($post_data['id'])) { return $response->withStatus($api_errors['0501']['http_status_code']) @@ -585,7 +585,7 @@ flextype()->delete('/api/media/files', function (Request $request, Response $res */ flextype()->patch('/api/media/files/meta', function (Request $request, Response $response) use ($api_errors) { // Get Post Data - $post_data = $request->getParsedBody(); + $post_data = (array) $request->getParsedBody(); if (! isset($post_data['token']) || ! isset($post_data['access_token']) || ! isset($post_data['id']) || ! isset($post_data['field']) || ! isset($post_data['value'])) { return $response->withStatus($api_errors['0501']['http_status_code']) @@ -696,7 +696,7 @@ flextype()->patch('/api/media/files/meta', function (Request $request, Response */ flextype()->post('/api/media/files/meta', function (Request $request, Response $response) use ($api_errors) { // Get Post Data - $post_data = $request->getParsedBody(); + $post_data = (array) $request->getParsedBody(); if (! isset($post_data['token']) || ! isset($post_data['access_token']) || ! isset($post_data['id']) || ! isset($post_data['field']) || ! isset($post_data['value'])) { return $response->withStatus($api_errors['0501']['http_status_code']) @@ -807,7 +807,7 @@ flextype()->post('/api/media/files/meta', function (Request $request, Response $ */ flextype()->delete('/api/media/files/meta', function (Request $request, Response $response) use ($api_errors) { // Get Post Data - $post_data = $request->getParsedBody(); + $post_data = (array) $request->getParsedBody(); if (! isset($post_data['token']) || ! isset($post_data['access_token']) || ! isset($post_data['id']) || ! isset($post_data['field'])) { return $response->withStatus($api_errors['0501']['http_status_code']) @@ -1020,7 +1020,7 @@ flextype()->get('/api/media/folders', function (Request $request, Response $resp */ flextype()->post('/api/media/folders', function (Request $request, Response $response) use ($api_errors) { // Get Post Data - $post_data = $request->getParsedBody(); + $post_data = (array) $request->getParsedBody(); if (! isset($post_data['token']) || ! isset($post_data['access_token']) || ! isset($post_data['id'])) { return $response->withStatus($api_errors['0601']['http_status_code']) @@ -1126,7 +1126,7 @@ flextype()->post('/api/media/folders', function (Request $request, Response $res */ flextype()->put('/api/media/folders/copy', function (Request $request, Response $response) use ($api_errors) { // Get Post Data - $post_data = $request->getParsedBody(); + $post_data = (array) $request->getParsedBody(); if (! isset($post_data['token']) || ! isset($post_data['access_token']) || ! isset($post_data['id']) || ! isset($post_data['new_id'])) { return $response->withStatus($api_errors['0601']['http_status_code']) @@ -1235,7 +1235,7 @@ flextype()->put('/api/media/folders/copy', function (Request $request, Response */ flextype()->put('/api/media/folders', function (Request $request, Response $response) use ($api_errors) { // Get Post Data - $post_data = $request->getParsedBody(); + $post_data = (array) $request->getParsedBody(); if (! isset($post_data['token']) || ! isset($post_data['access_token']) || ! isset($post_data['id']) || ! isset($post_data['new_id'])) { return $response->withStatus($api_errors['0601']['http_status_code']) @@ -1341,7 +1341,7 @@ flextype()->put('/api/media/folders', function (Request $request, Response $resp */ flextype()->delete('/api/media/folders', function (Request $request, Response $response) use ($api_errors) { // Get Post Data - $post_data = $request->getParsedBody(); + $post_data = (array) $request->getParsedBody(); if (! isset($post_data['token']) || ! isset($post_data['access_token']) || ! isset($post_data['id'])) { return $response->withStatus($api_errors['0601']['http_status_code']) From ed5103e80e1bcaa112472d24c77e7caa8e9f2d13 Mon Sep 17 00:00:00 2001 From: Awilum Date: Sun, 27 Dec 2020 22:00:54 +0300 Subject: [PATCH 18/32] fix(entries-fields): fix issue with undefined $data variable in EntriesField #528 --- src/flextype/Foundation/Entries/Fields/EntriesField.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/flextype/Foundation/Entries/Fields/EntriesField.php b/src/flextype/Foundation/Entries/Fields/EntriesField.php index 2a05e0a4..c3ee7208 100644 --- a/src/flextype/Foundation/Entries/Fields/EntriesField.php +++ b/src/flextype/Foundation/Entries/Fields/EntriesField.php @@ -14,6 +14,7 @@ if (flextype('registry')->get('flextype.settings.entries.fields.entries.fetch.en if (flextype('entries')->hasStorage('fetch.data.entries.fetch')) { // Get fetch. $original = flextype('entries')->getStorage('fetch'); + $data = []; switch (flextype('registry')->get('flextype.settings.entries.fields.entries.fetch.result')) { case 'toArray': From 0255e216405b2b36ed4a2c095e1985af8c833487 Mon Sep 17 00:00:00 2001 From: Awilum Date: Sun, 27 Dec 2020 22:01:51 +0300 Subject: [PATCH 19/32] fix(entries-fields): fix issue with undefined $data variable in MediaField #529 --- src/flextype/Foundation/Entries/Fields/MediaField.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/flextype/Foundation/Entries/Fields/MediaField.php b/src/flextype/Foundation/Entries/Fields/MediaField.php index eb4823ed..c0f31fb9 100644 --- a/src/flextype/Foundation/Entries/Fields/MediaField.php +++ b/src/flextype/Foundation/Entries/Fields/MediaField.php @@ -14,6 +14,7 @@ if (flextype('registry')->get('flextype.settings.entries.fields.media.files.fetc if (flextype('entries')->hasStorage('fetch.data.media.files.fetch')) { // Get fetch. $original = flextype('entries')->getStorage('fetch'); + $data = []; switch (flextype('registry')->get('flextype.settings.entries.fields.media.files.fetch.result')) { case 'toArray': @@ -63,6 +64,7 @@ if (flextype('registry')->get('flextype.settings.entries.fields.media.folders.fe // Get fetch. $original = flextype('entries')->getStorage('fetch'); + $data = []; switch (flextype('registry')->get('flextype.settings.entries.fields.media.folders.fetch.result')) { case 'toArray': From 43a77995e565d4dbf7d709ffcc93800edfc1d793 Mon Sep 17 00:00:00 2001 From: Awilum Date: Sun, 27 Dec 2020 22:16:17 +0300 Subject: [PATCH 20/32] refactor(shortcode): fix typhint in Shortcode --- src/flextype/Support/Parsers/Shortcode.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/flextype/Support/Parsers/Shortcode.php b/src/flextype/Support/Parsers/Shortcode.php index 09517770..5dc17046 100644 --- a/src/flextype/Support/Parsers/Shortcode.php +++ b/src/flextype/Support/Parsers/Shortcode.php @@ -49,8 +49,6 @@ final class Shortcode /** * Shortcode construct - * - * @param */ protected function __construct() { @@ -59,8 +57,6 @@ final class Shortcode /** * Shortcode facade - * - * @param */ public function facade(): ShortcodeFacade { @@ -69,8 +65,6 @@ final class Shortcode /** * Returns Shortcode Instance - * - * @param */ public static function getInstance(): Shortcode { From c5b57620ef35621a925b987df373d43254293922 Mon Sep 17 00:00:00 2001 From: Awilum Date: Sun, 27 Dec 2020 22:17:07 +0300 Subject: [PATCH 21/32] refactor(core): mute phpstat.neon --- phpstan.neon | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpstan.neon b/phpstan.neon index e6fd563a..4d456c50 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,5 +1,5 @@ parameters: - level: max + level: 0 paths: - src ignoreErrors: From ea125e012e66991fa03d0be31e2c8824ef398e07 Mon Sep 17 00:00:00 2001 From: Awilum Date: Sun, 27 Dec 2020 22:42:55 +0300 Subject: [PATCH 22/32] feat(plugins): use plugin.php as common point to access plugin feature #530 BREAKING CHANGES in your plugin rename bootstrap.php to plugin.php --- src/flextype/Foundation/Plugins.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/flextype/Foundation/Plugins.php b/src/flextype/Foundation/Plugins.php index f4c328bf..c4e06f13 100755 --- a/src/flextype/Foundation/Plugins.php +++ b/src/flextype/Foundation/Plugins.php @@ -378,7 +378,7 @@ class Plugins continue; } - include_once PATH['project'] . '/plugins/' . $pluginName . '/bootstrap.php'; + include_once PATH['project'] . '/plugins/' . $pluginName . '/plugin.php'; } } } From aa60ce360f36adccc0b1879eea5b8ceb38be5d7e Mon Sep 17 00:00:00 2001 From: Awilum Date: Mon, 28 Dec 2020 00:57:19 +0300 Subject: [PATCH 23/32] fix(entries): fix issue with empty variable $data in fetch() method. #531 --- src/flextype/Foundation/Entries/Entries.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/flextype/Foundation/Entries/Entries.php b/src/flextype/Foundation/Entries/Entries.php index fa7add06..49aef40b 100755 --- a/src/flextype/Foundation/Entries/Entries.php +++ b/src/flextype/Foundation/Entries/Entries.php @@ -179,6 +179,9 @@ class Entries // Walk through entries results if ($entries->hasResults()) { + + $data = []; + foreach ($entries as $currenEntry) { if ($currenEntry->getType() !== 'file' || $currenEntry->getFilename() !== 'entry' . '.' . flextype('registry')->get('flextype.settings.entries.extension')) { continue; From c24af495d619386bb4c80fec69d60e91a537e043 Mon Sep 17 00:00:00 2001 From: Awilum Date: Mon, 28 Dec 2020 01:05:26 +0300 Subject: [PATCH 24/32] refactor(core): mute phpstat.neon --- phpstan.neon | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/phpstan.neon b/phpstan.neon index 4d456c50..9e85587b 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,5 +1,6 @@ parameters: - level: 0 + level: 3 + reportUnmatchedIgnoredErrors: false paths: - src ignoreErrors: From 7fdf75320ba709ddb4c3e9ab9a6611a942211692 Mon Sep 17 00:00:00 2001 From: Awilum Date: Mon, 28 Dec 2020 01:06:09 +0300 Subject: [PATCH 25/32] fix(entries): fix issue with deleteStorage() method return data in Entries API. #532 --- src/flextype/Foundation/Entries/Entries.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/flextype/Foundation/Entries/Entries.php b/src/flextype/Foundation/Entries/Entries.php index 49aef40b..bc1fd831 100755 --- a/src/flextype/Foundation/Entries/Entries.php +++ b/src/flextype/Foundation/Entries/Entries.php @@ -430,11 +430,13 @@ class Entries * * @param array|string $keys Keys * - * @return array Updated storage. + * @return self Returns instance of The Entries class. */ public function deleteStorage($keys): self { - return $this->storage = arrays($this->storage)->delete($keys)->toArray(); + $this->storage = arrays($this->storage)->delete($keys)->toArray(); + + return $this; } /** From 1daffb5361dc14536a2308fcb2f275d5766ffe9c Mon Sep 17 00:00:00 2001 From: Awilum Date: Mon, 28 Dec 2020 01:10:35 +0300 Subject: [PATCH 26/32] feat(entries): return $this instead of void in setStorage() method in Entries API. #533 --- src/flextype/Foundation/Entries/Entries.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/flextype/Foundation/Entries/Entries.php b/src/flextype/Foundation/Entries/Entries.php index bc1fd831..44c9edd2 100755 --- a/src/flextype/Foundation/Entries/Entries.php +++ b/src/flextype/Foundation/Entries/Entries.php @@ -418,11 +418,13 @@ class Entries * * @access public * - * @return array Updated storage. + * @return self Returns instance of The Entries class. */ - public function setStorage(?string $key, $value): void + public function setStorage(?string $key, $value): self { $this->storage = arrays($this->storage)->set($key, $value)->toArray(); + + return $this; } /** From 2af20d3402ba251c3b74cecea179f79ce3ad227c Mon Sep 17 00:00:00 2001 From: Awilum Date: Mon, 28 Dec 2020 11:19:02 +0300 Subject: [PATCH 27/32] refactor(find): fix typhint in FindHelper --- src/flextype/Support/Helpers/FindHelper.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/flextype/Support/Helpers/FindHelper.php b/src/flextype/Support/Helpers/FindHelper.php index 52d293d1..a7f4bc86 100644 --- a/src/flextype/Support/Helpers/FindHelper.php +++ b/src/flextype/Support/Helpers/FindHelper.php @@ -7,7 +7,7 @@ declare(strict_types=1); * Founded by Sergey Romanenko and maintained by Flextype Community. */ -use Symfony\Component\Finder\Finder; +use Symfony\Component\Finder\Finder as Finder; if (! function_exists('find')) { /** @@ -17,7 +17,7 @@ if (! function_exists('find')) { * @param array $options Options array. * @param string $searchIn Search in 'files' or 'directories'. Default is 'files'. * - * @return Symfony\Component\Finder + * @return Finder */ function find(string $path = '', array $options = [], string $searchIn = 'files'): Finder { From 536e31dc801295fe4caf9b73a78e1904a119b467 Mon Sep 17 00:00:00 2001 From: Awilum Date: Mon, 28 Dec 2020 11:31:34 +0300 Subject: [PATCH 28/32] refactor(entries): fix typhint in Entries API --- src/flextype/Foundation/Entries/Entries.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/flextype/Foundation/Entries/Entries.php b/src/flextype/Foundation/Entries/Entries.php index 44c9edd2..53befecf 100755 --- a/src/flextype/Foundation/Entries/Entries.php +++ b/src/flextype/Foundation/Entries/Entries.php @@ -74,7 +74,7 @@ class Entries * * @access public * - * @return self Returns instance of The Arrays class. + * @return Arrays Returns instance of The Arrays class with items. */ public function fetch(string $id, array $options = []): Arrays { From 08757d076246a8d8dc73c03322b4fab018d35b14 Mon Sep 17 00:00:00 2001 From: Awilum Date: Mon, 28 Dec 2020 11:40:25 +0300 Subject: [PATCH 29/32] refactor(core): mute phpstat.neon --- phpstan.neon | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpstan.neon b/phpstan.neon index 9e85587b..aa8255cc 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,5 +1,5 @@ parameters: - level: 3 + level: 0 reportUnmatchedIgnoredErrors: false paths: - src From d33b0146d3516ea21c4caf77b0ead230b7fc7a4b Mon Sep 17 00:00:00 2001 From: Awilum Date: Mon, 28 Dec 2020 18:50:22 +0300 Subject: [PATCH 30/32] update CHANGELOG.md --- CHANGELOG.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bed5200c..ee020575 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,24 @@ + +# [0.9.14](https://github.com/flextype/flextype/compare/v0.9.13...v0.9.14) (2020-12-xx) + +### Features + +* **core** Moving to PHP 7.4.0 ([#524](https://github.com/flextype/flextype/issues/524)) + +* **plugins** Set default plugin priority 100 and SORT them ascending ([#523](https://github.com/flextype/flextype/issues/523)) + +### Bug Fixes + +* **core** fix issue with Rest API endpoints detection. ([#522](https://github.com/flextype/flextype/issues/522)) + +* **entries** fix issue with empty variable $data in fetch() method. ([#531](https://github.com/flextype/flextype/issues/531)) + +* **entries** fix issue with deleteStorage() method return data. + +### Refactoring + +* **core** general code refactoring and improvements. + # [0.9.13](https://github.com/flextype/flextype/compare/v0.9.12...v0.9.13) (2020-12-20) From f4ff94d7b0428676a6b9af9c5a642e8fa428dfd6 Mon Sep 17 00:00:00 2001 From: Awilum Date: Mon, 28 Dec 2020 19:58:04 +0300 Subject: [PATCH 31/32] refactor(core): change http://flextype.org to https://flextype.org --- .htaccess | 2 +- BACKERS.md | 2 +- index.php | 2 +- src/flextype/Endpoints/Utils/access.php | 2 +- src/flextype/Endpoints/Utils/errors.php | 2 +- src/flextype/Endpoints/entries.php | 2 +- src/flextype/Endpoints/images.php | 2 +- src/flextype/Endpoints/media.php | 2 +- src/flextype/Endpoints/registry.php | 2 +- src/flextype/Foundation/Helpers/FlextypeHelper.php | 2 +- src/flextype/Foundation/Plugins.php | 1 + src/flextype/Support/Helpers/FilterHelper.php | 2 +- src/flextype/Support/Helpers/FindHelper.php | 2 +- src/flextype/bootstrap.php | 2 +- src/flextype/dependencies.php | 2 +- 15 files changed, 15 insertions(+), 14 deletions(-) diff --git a/.htaccess b/.htaccess index 85c9057e..300e581a 100755 --- a/.htaccess +++ b/.htaccess @@ -1,5 +1,5 @@ ## -# Flextype (http://flextype.org) +# Flextype (https://flextype.org) # Founded by Sergey Romanenko and maintained by Flextype Community. # diff --git a/BACKERS.md b/BACKERS.md index 41de6a76..6f302220 100644 --- a/BACKERS.md +++ b/BACKERS.md @@ -5,7 +5,7 @@ Flextype is an MIT-licensed open source project and completely free to use.. However, the amount of effort needed to maintain and develop new features for the project is not sustainable without proper financial backing. You can support it's ongoing development by being a backer or a sponsor: * [Become a backer or sponsor on Patreon](https://www.patreon.com/awilum). -* [One-time donation via PayPal, QIWI, Sberbank, Yandex](http://flextype.org/en/one-time-donation) +* [One-time donation via PayPal, QIWI, Sberbank, Yandex](https://flextype.org/en/one-time-donation) * [Visit our Sponsors & Backers page](https://flextype.org/en/sponsors) ### Gold Sponsor diff --git a/index.php b/index.php index 5fd44cba..8929535d 100755 --- a/index.php +++ b/index.php @@ -3,7 +3,7 @@ declare(strict_types=1); /** - * Flextype (http://flextype.org) + * Flextype (https://flextype.org) * Founded by Sergey Romanenko and maintained by Flextype Community. */ diff --git a/src/flextype/Endpoints/Utils/access.php b/src/flextype/Endpoints/Utils/access.php index 5168f780..c47c1187 100644 --- a/src/flextype/Endpoints/Utils/access.php +++ b/src/flextype/Endpoints/Utils/access.php @@ -3,7 +3,7 @@ declare(strict_types=1); /** - * Flextype (http://flextype.org) + * Flextype (https://flextype.org) * Founded by Sergey Romanenko and maintained by Flextype Community. */ diff --git a/src/flextype/Endpoints/Utils/errors.php b/src/flextype/Endpoints/Utils/errors.php index ec78f3fc..43926445 100644 --- a/src/flextype/Endpoints/Utils/errors.php +++ b/src/flextype/Endpoints/Utils/errors.php @@ -3,7 +3,7 @@ declare(strict_types=1); /** - * Flextype (http://flextype.org) + * Flextype (https://flextype.org) * Founded by Sergey Romanenko and maintained by Flextype Community. */ diff --git a/src/flextype/Endpoints/entries.php b/src/flextype/Endpoints/entries.php index f1d0a767..ddcc1579 100644 --- a/src/flextype/Endpoints/entries.php +++ b/src/flextype/Endpoints/entries.php @@ -3,7 +3,7 @@ declare(strict_types=1); /** - * Flextype (http://flextype.org) + * Flextype (https://flextype.org) * Founded by Sergey Romanenko and maintained by Flextype Community. */ diff --git a/src/flextype/Endpoints/images.php b/src/flextype/Endpoints/images.php index a0d7e771..2e671de9 100644 --- a/src/flextype/Endpoints/images.php +++ b/src/flextype/Endpoints/images.php @@ -3,7 +3,7 @@ declare(strict_types=1); /** - * Flextype (http://flextype.org) + * Flextype (https://flextype.org) * Founded by Sergey Romanenko and maintained by Flextype Community. */ diff --git a/src/flextype/Endpoints/media.php b/src/flextype/Endpoints/media.php index 311441cc..ca1a4f12 100644 --- a/src/flextype/Endpoints/media.php +++ b/src/flextype/Endpoints/media.php @@ -3,7 +3,7 @@ declare(strict_types=1); /** - * Flextype (http://flextype.org) + * Flextype (https://flextype.org) * Founded by Sergey Romanenko and maintained by Flextype Community. */ diff --git a/src/flextype/Endpoints/registry.php b/src/flextype/Endpoints/registry.php index 2be69fd0..87d0fcdd 100644 --- a/src/flextype/Endpoints/registry.php +++ b/src/flextype/Endpoints/registry.php @@ -3,7 +3,7 @@ declare(strict_types=1); /** - * Flextype (http://flextype.org) + * Flextype (https://flextype.org) * Founded by Sergey Romanenko and maintained by Flextype Community. */ diff --git a/src/flextype/Foundation/Helpers/FlextypeHelper.php b/src/flextype/Foundation/Helpers/FlextypeHelper.php index fd690438..a181b567 100644 --- a/src/flextype/Foundation/Helpers/FlextypeHelper.php +++ b/src/flextype/Foundation/Helpers/FlextypeHelper.php @@ -3,7 +3,7 @@ declare(strict_types=1); /** - * Flextype (http://flextype.org) + * Flextype (https://flextype.org) * Founded by Sergey Romanenko and maintained by Flextype Community. */ diff --git a/src/flextype/Foundation/Plugins.php b/src/flextype/Foundation/Plugins.php index c4e06f13..5c254686 100755 --- a/src/flextype/Foundation/Plugins.php +++ b/src/flextype/Foundation/Plugins.php @@ -102,6 +102,7 @@ class Plugins // Go through... foreach ($pluginsList as $plugin) { + // Set plugin settings directory $projectPluginSettingsDir = PATH['project'] . '/config/plugins/' . $plugin['dirname']; diff --git a/src/flextype/Support/Helpers/FilterHelper.php b/src/flextype/Support/Helpers/FilterHelper.php index 5f318719..08415fa9 100644 --- a/src/flextype/Support/Helpers/FilterHelper.php +++ b/src/flextype/Support/Helpers/FilterHelper.php @@ -3,7 +3,7 @@ declare(strict_types=1); /** - * Flextype (http://flextype.org) + * Flextype (https://flextype.org) * Founded by Sergey Romanenko and maintained by Flextype Community. */ diff --git a/src/flextype/Support/Helpers/FindHelper.php b/src/flextype/Support/Helpers/FindHelper.php index a7f4bc86..e401c75c 100644 --- a/src/flextype/Support/Helpers/FindHelper.php +++ b/src/flextype/Support/Helpers/FindHelper.php @@ -3,7 +3,7 @@ declare(strict_types=1); /** - * Flextype (http://flextype.org) + * Flextype (https://flextype.org) * Founded by Sergey Romanenko and maintained by Flextype Community. */ diff --git a/src/flextype/bootstrap.php b/src/flextype/bootstrap.php index 4cf5f2cf..0116082c 100755 --- a/src/flextype/bootstrap.php +++ b/src/flextype/bootstrap.php @@ -3,7 +3,7 @@ declare(strict_types=1); /** - * Flextype (http://flextype.org) + * Flextype (https://flextype.org) * Founded by Sergey Romanenko and maintained by Flextype Community. */ diff --git a/src/flextype/dependencies.php b/src/flextype/dependencies.php index 05d72754..25980428 100644 --- a/src/flextype/dependencies.php +++ b/src/flextype/dependencies.php @@ -3,7 +3,7 @@ declare(strict_types=1); /** - * Flextype (http://flextype.org) + * Flextype (https://flextype.org) * Founded by Sergey Romanenko and maintained by Flextype Community. */ From 9f4abce815c6cb6f3daa0d9e38de0a9e2c96c292 Mon Sep 17 00:00:00 2001 From: Awilum Date: Wed, 30 Dec 2020 16:14:16 +0300 Subject: [PATCH 32/32] Flextype 0.9.14 --- CHANGELOG.md | 2 +- src/flextype/Foundation/Flextype.php | 2 +- src/flextype/flextype.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ee020575..76f28102 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,5 @@ -# [0.9.14](https://github.com/flextype/flextype/compare/v0.9.13...v0.9.14) (2020-12-xx) +# [0.9.14](https://github.com/flextype/flextype/compare/v0.9.13...v0.9.14) (2020-12-30) ### Features diff --git a/src/flextype/Foundation/Flextype.php b/src/flextype/Foundation/Flextype.php index 6eb81cdf..e1a75185 100644 --- a/src/flextype/Foundation/Flextype.php +++ b/src/flextype/Foundation/Flextype.php @@ -22,7 +22,7 @@ final class Flextype extends App /** * Flextype version */ - public const VERSION = '0.9.13'; + public const VERSION = '0.9.14'; /** * The Flextype's instance is stored in a static field. This field is an diff --git a/src/flextype/flextype.yaml b/src/flextype/flextype.yaml index 31ec3d10..e5fcc2b8 100644 --- a/src/flextype/flextype.yaml +++ b/src/flextype/flextype.yaml @@ -1,5 +1,5 @@ name: Flextype -version: 0.9.13 +version: 0.9.14 description: Hybrid Content Management System author: name: Sergey Romanenko