Skip to content

Commit

Permalink
Merge branch '1.14.x' into 2.0.x
Browse files Browse the repository at this point in the history
* 1.14.x:
  Bump CI actions (doctrine#497)
  Fix CS
  Convert ini_get result to bool before evaluating (doctrine#446)
  • Loading branch information
derrabus committed Sep 5, 2024
2 parents 01489ff + f5c1c45 commit d69b6bf
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/coding-standards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ on:
jobs:
coding-standards:
name: "Coding Standards"
uses: "doctrine/.github/.github/workflows/coding-standards.yml@2.1.0"
uses: "doctrine/.github/.github/workflows/coding-standards.yml@5.0.1"
2 changes: 1 addition & 1 deletion .github/workflows/composer-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ on:
jobs:
composer-lint:
name: "Composer Lint"
uses: "doctrine/.github/.github/workflows/composer-lint.yml@2.1.0"
uses: "doctrine/.github/.github/workflows/composer-lint.yml@5.0.1"
6 changes: 4 additions & 2 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ env:
jobs:
phpunit:
name: "PHPUnit"
uses: "doctrine/.github/.github/workflows/continuous-integration.yml@2.1.0"
uses: "doctrine/.github/.github/workflows/continuous-integration.yml@5.0.1"
with:
php-versions: '["7.2", "7.3", "7.4", "8.0", "8.1", "8.2"]'
php-versions: '["7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"]'
secrets:
CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}"
2 changes: 1 addition & 1 deletion .github/workflows/release-on-milestone-closed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
release:
name: "Git tag, release & create merge-up PR"
uses: "doctrine/.github/.github/workflows/release-on-milestone-closed.yml@2.1.0"
uses: "doctrine/.github/.github/workflows/release-on-milestone-closed.yml@5.0.1"
secrets:
GIT_AUTHOR_EMAIL: ${{ secrets.GIT_AUTHOR_EMAIL }}
GIT_AUTHOR_NAME: ${{ secrets.GIT_AUTHOR_NAME }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ on:
jobs:
static-analysis:
name: "Static Analysis"
uses: "doctrine/.github/.github/workflows/static-analysis.yml@3.0.0"
uses: "doctrine/.github/.github/workflows/static-analysis.yml@5.0.1"
13 changes: 10 additions & 3 deletions lib/Doctrine/Common/Annotations/AnnotationReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@
use function array_merge;
use function class_exists;
use function extension_loaded;
use function filter_var;
use function ini_get;

use const FILTER_VALIDATE_BOOLEAN;

/**
* A reader for docblock annotations.
*/
Expand Down Expand Up @@ -105,13 +108,17 @@ public static function addGlobalIgnoredNamespace(string $namespace)
public function __construct(?DocParser $parser = null)
{
if (
extension_loaded('Zend Optimizer+') && (ini_get('zend_optimizerplus.save_comments') === '0' ||
ini_get('opcache.save_comments') === '0')
extension_loaded('Zend Optimizer+') &&
(filter_var(ini_get('zend_optimizerplus.save_comments'), FILTER_VALIDATE_BOOLEAN) === false ||
filter_var(ini_get('opcache.save_comments'), FILTER_VALIDATE_BOOLEAN) === false)
) {
throw AnnotationException::optimizerPlusSaveComments();
}

if (extension_loaded('Zend OPcache') && ini_get('opcache.save_comments') === 0) {
if (
extension_loaded('Zend OPcache') &&
filter_var(ini_get('opcache.save_comments'), FILTER_VALIDATE_BOOLEAN) === false
) {
throw AnnotationException::optimizerPlusSaveComments();
}

Expand Down

0 comments on commit d69b6bf

Please sign in to comment.