Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ jobs:
operating-system:
- ubuntu-latest
php-versions:
- '8.1.33'
- '8.2.29'
- '8.3.25'
- '8.4.12'
- '8.5.0beta2'
- '8.1'
- '8.2'
- '8.3'
- '8.4'
- '8.5'
steps:
- name: "Purge built-in PHP version"
run: |
Expand Down Expand Up @@ -98,10 +98,15 @@ jobs:
libbz2-dev \
libzip-dev
- name: "Set php-src download URL"
run: echo "php_src_download_url=https://www.php.net/distributions/php-${{ matrix.php-versions }}.tar.gz" >> $GITHUB_ENV
if: ${{ !startsWith(matrix.php-versions, '8.5') }}
run: |
DIST_URL=`curl -fsSL "https://www.php.net/releases/index.php?json&max=1&version=${{ matrix.php-versions }}" | jq -r '.[].source[]|select(.filename|endswith(".gz")).filename'`
echo "php_src_download_url=https://www.php.net/distributions/$DIST_URL" >> $GITHUB_ENV
- name: "Set php-src download URL (8.5 pre-release)"
if: ${{ startsWith(matrix.php-versions, '8.5.') }}
run: echo "php_src_download_url=https://downloads.php.net/~daniels/php-${{ matrix.php-versions }}.tar.gz" >> $GITHUB_ENV
if: ${{ startsWith(matrix.php-versions, '8.5') }}
run: |
RC_URL=`curl -fsSL "https://www.php.net/release-candidates.php?format=json" | jq -r '.releases[]|select(.version|startswith("${{ matrix.php-versions }}")).files.gz.path'`
echo "php_src_download_url=$RC_URL" >> $GITHUB_ENV
- name: "Install PHP ${{ matrix.php-versions }}"
run: |
mkdir -p /tmp/php
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@
"symfony/event-dispatcher": "^6.4.25",
"symfony/process": "^6.4.26",
"thephpf/attestation": "^0.0.2",
"webmozart/assert": "^1.11"
"webmozart/assert": "^1.12"
},
"require-dev": {
"ext-openssl": "*",
"behat/behat": "^3.24.1",
"behat/behat": "^3.25.0",
"bnf/phpstan-psr-container": "^1.1",
"doctrine/coding-standard": "^14.0.0",
"phpstan/phpstan": "^2.1.29",
"phpstan/phpstan": "^2.1.31",
"phpunit/phpunit": "^10.5.58"
},
"replace": {
Expand Down
65 changes: 30 additions & 35 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,6 @@ parameters:
count: 1
path: src/ComposerIntegration/Listeners/RemoveUnrelatedInstallOperations.php

-
message: '#^Offset ''question'' on array\{question\: Symfony\\Component\\Console\\Helper\\QuestionHelper\} on left side of \?\? always exists and is not nullable\.$#'
identifier: nullCoalesce.offset
count: 1
path: src/ComposerIntegration/MinimalHelperSet.php

-
message: '#^Parameter \#3 \$package of class Php\\Pie\\ComposerIntegration\\PieComposerInstaller constructor expects Composer\\Package\\BasePackage&Composer\\Package\\RootPackageInterface, Composer\\Package\\RootPackageInterface given\.$#'
identifier: argument.type
Expand Down
1 change: 1 addition & 0 deletions src/ComposerIntegration/BundledPhpExtensionsRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
use function realpath;
use function sprintf;

/** @internal This is not public API for PIE, so should not be depended upon unless you accept the risk of BC breaks */
class BundledPhpExtensionsRepository extends ArrayRepository
{
/**
Expand Down
2 changes: 1 addition & 1 deletion src/ComposerIntegration/MinimalHelperSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
/** @internal This is not public API for PIE, so should not be depended upon unless you accept the risk of BC breaks */
class MinimalHelperSet extends HelperSet
{
/** @param array{question: QuestionHelper} $helpers */
/** @param array{question?: QuestionHelper|mixed} $helpers */
public function __construct(array $helpers)
{
Assert::isInstanceOf(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
use function strlen;
use function substr;

/** @internal This is not public API for PIE, so should not be depended upon unless you accept the risk of BC breaks */
class DetermineExtensionsRequired
{
public static function linkFilter(Link $link): bool
Expand Down
1 change: 1 addition & 0 deletions src/SelfManage/Update/Channel.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace Php\Pie\SelfManage\Update;

/** @internal This is not public API for PIE, so should not be depended upon unless you accept the risk of BC breaks */
enum Channel: string
{
case Stable = 'stable';
Expand Down
1 change: 0 additions & 1 deletion src/SelfManage/Update/FetchPieRelease.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
/** @internal This is not public API for PIE, so should not be depended upon unless you accept the risk of BC breaks */
interface FetchPieRelease
{
/** @throws PiePharMissingFromLatestRelease */
public function latestReleaseMetadata(Channel $updateChannel): ReleaseMetadata;

/** Download the given pie.phar and return the filename (should be a temp file) */
Expand Down
1 change: 0 additions & 1 deletion src/SelfManage/Verify/Attestation.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ public static function fromAttestationBundleWithDsseEnvelope(array $attestation)
$decoratedCertificate = "-----BEGIN CERTIFICATE-----\n"
. wordwrap($attestation['bundle']['verificationMaterial']['certificate']['rawBytes'], 67, "\n", true) . "\n"
. "-----END CERTIFICATE-----\n";
Assert::stringNotEmpty($decoratedCertificate);

$decodedPayload = base64_decode($attestation['bundle']['dsseEnvelope']['payload']);
Assert::stringNotEmpty($decodedPayload);
Expand Down