Skip to content

Upgrading pestphp/pest 3 to 4

Review neededv3.8.7 → v4.7.8Security3New12Changed4Fixed34Other16

Review neededUpgrade verdict

4 changed defaults and 3 security fixes.

  • The package contains several internal security hardening changes.
  • This release updates the underlying PHPUnit testing library to a safe version, because older versions have a known security problem.
  • A security problem coming from the PHPUnit dependency is fixed.
3 items need code or config changes

PHP requirement changed in v4.0.0: ^8.2.0 → ^8.3.0.

Security3
Includes various security improvements.
Bumps PHPUnit because previous versions became invalid due to security advisory GHSA-qrr6-mg7r-m243.
Fixes a security issue found in PHPUnit.

Generated by DepDelta from published PHP source. Not mixed with prose notes.

  • changed: final readonly class Kernel → final class Kernel
  • changed: method Expectation.__call(string $method, array $parameters): Expectation|HigherOrderExpectation|PendingArchExpectation → method Expectation.__call(string $method, array $parameters): Expectation|HigherOrderExpectation|PendingArchExpectation|ArchExpectation
  • changed: method Expectation.__get(string $name) → method Expectation.__get(string $name): mixed
  • changed: method Expectation.dd(mixed ...$arguments): void → method Expectation.dd(mixed ...$arguments): never
  • added: method Configuration.browser(): Browser\Configuration
  • added: method Configuration.only(): void
  • added: method Expectation.toBeCasedCorrectly(): ArchExpectation
  • added: method Expectation.toHaveSuspiciousCharacters(): ArchExpectation
  • changed: const BootOverrides.FILES → const BootOverrides.FILES: array
  • removed: constructor Testable(string $name)
  • added: method Testable.__initializeTestCase(): void
  • added: method Testable.shell(): void
  • changed: method Project.gitlab(string $project): self → method Project.gitlab(string $project, string $hostname = …): self
  • added: constructor DatasetProviderError(Throwable $previous)
  • added: final class DatasetProviderError extends RuntimeException
  • added: method OppositeExpectation.toHaveSuspiciousCharacters(): ArchExpectation
  • added: property TestCaseFactory.namespace: ?string
  • added: property TestCaseMethodFactory.flakyTries: ?int
  • removed: final class CoversNothing
  • added: final readonly class PluginBrowser
  • added: static method PluginBrowser.install(): void
  • changed: method Expectation.toMatchObject(iterable $object, string $message = …): self → method Expectation.toMatchObject(object|iterable $object, string $message = …): self
  • added: method Expectation.toBeSlug(string $message = …): self
  • added: constructor HigherOrderExpectationTypeExtension(ReflectionProvider $reflectionProvider)
  • added: final readonly class HigherOrderExpectationTypeExtension implements ExpressionTypeResolverExtension
  • added: method HigherOrderExpectationTypeExtension.getType(Expr $expr, Scope $scope): ?Type
  • removed: method TestCall.coversNothing(): self
  • changed: constructor DescribeCall(TestSuite $testSuite, string $filename, string $description, Closure $tests) → constructor DescribeCall(TestSuite $testSuite, string $filename, Description $description, Closure $tests)
  • changed: property DescribeCall.description: string → property DescribeCall.description: Description
  • added: method TestCall.flaky(int $tries = …): self
  • added: method TestCall.references(string|array ...$classes): self
  • added: method TestCall.see(string|array ...$classes): self
  • added: method TestCall.skipLocally(): self
  • added: method TestCall.skipOnCI(): self
  • changed: const Configuration.BASE_PHPUNIT_FILE → const Configuration.BASE_PHPUNIT_FILE: string
  • changed: const Environment.CI → const Environment.CI: string
  • changed: const Environment.LOCAL → const Environment.LOCAL: string
  • changed: static method Only.enable(TestCall $testCall, string $group = …): void → static method Only.enable(TestCall|TestCaseMethodFactory $testCall, string $group = …): void
  • added: constructor Shard(OutputInterface $output)
  • added: final class Shard implements AddsOutput, HandlesArguments, Terminable
  • added: method Parallel.processTeamcityArguments(array $arguments): array
  • added: method Shard.addOutput(int $exitCode): int
  • added: method Shard.handleArguments(array $arguments): array
  • added: method Shard.terminate(): void
  • added: property Coverage.showOnlyCovered: bool
  • added: static method Shard.getShard(InputInterface $input): array
  • added: static property Snapshot.updateSnapshots: bool
  • added: method HandleArguments.popArgumentValue(string $argument, array &$arguments): ?string
  • changed: method ResultPrinter.printFeedback(SplFileInfo $progressFile, SplFileInfo $outputFile, array $teamcityFiles): void → method ResultPrinter.printFeedback(SplFileInfo $progressFile, SplFileInfo $outputFile, ?SplFileInfo $teamcityFile): void
  • added: static property WrapperRunner.result: ?TestResult
  • changed: static method CompactPrinter.default(): self → static method CompactPrinter.default(bool $decorated = …): self
  • changed: constructor SnapshotRepository(string $testsPath, string $snapshotsPath) → constructor SnapshotRepository(string $rootPath, string $testsPath, string $snapshotsPath)
  • changed: static method DatasetsRepository.get(string $filename, string $description): Closure|array → static method DatasetsRepository.get(string $filename, string $description): array
  • added: method TestRepository.getUsesForPath(string $path): array
  • added: constructor EnsureTestCaseIsInitiatedFilter(RecursiveIterator $iterator)
  • added: final class EnsureTestCaseIsInitiatedFilter extends RecursiveFilterIterator
  • added: method EnsureTestCaseIsInitiatedFilter.accept(): bool
  • changed: final readonly class EnsureTeamCityEnabled implements ConfiguredSubscriber → final class EnsureTeamCityEnabled implements ConfiguredSubscriber
  • added: final class EnsureShardTimingFinished implements FinishedSubscriber
  • added: final class EnsureShardTimingStarted implements StartedSubscriber
  • added: final class EnsureShardTimingsAreCollected
  • added: method EnsureShardTimingFinished.notify(Finished $event): void
  • added: method EnsureShardTimingStarted.notify(Started $event): void
  • added: static method EnsureShardTimingsAreCollected.finished(Finished $event): void
  • added: static method EnsureShardTimingsAreCollected.started(Started $event): void
  • added: static method EnsureShardTimingsAreCollected.timings(): array
  • changed: const DatasetInfo.DATASETS_DIR_NAME → const DatasetInfo.DATASETS_DIR_NAME: string
  • changed: const DatasetInfo.DATASETS_FILE_NAME → const DatasetInfo.DATASETS_FILE_NAME: string
  • changed: const HigherOrderMessage.UNDEFINED_METHOD → const HigherOrderMessage.UNDEFINED_METHOD: string
  • changed: method HigherOrderTapProxy.__get(string $property) → method HigherOrderTapProxy.__get(string $property): mixed
  • changed: static method Coverage.report(OutputInterface $output, bool $compact = …): float → static method Coverage.report(OutputInterface $output, bool $compact = …, bool $showOnlyCovered = …): float
  • added: constructor Description(string $description)
  • added: final class Shell
  • added: final readonly class Description implements \Stringable
  • added: method Description.__toString(): string
  • added: static method Shell.open(): void
  • added: static method Str.slugify(string $target): string
  • added: final readonly class FlakyTestCaseFilter implements TestCaseMethodFilter
  • added: method FlakyTestCaseFilter.accept(TestCaseMethodFactory $factory): bool
  • added: function fixture(string $file): string
  • added: function visit(array|string $url, array $options = …): ArrayablePendingAwaitablePage|PendingAwaitablePage