pestphp / pestphp/pest

[Feature request] Architecture tests ignore Vendor

Open
#1,672 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
11.7k
Forks
538
Avg merge
4d 11h
Merged PRs (30d)
8

Description

I have some extensive tests, but my CI is failing due to a deprecation being thrown when I do:

arch()->group('arch')
    ->preset()
    ->laravel();

The issue is that some packages in vendor are causing deprecations to be thrown i.e. preset → laravel → Case statements followed by a semicolon (;) are deprecated, use a colon (:) instead // D:\sites\3927ml-voucher-fulfilment\vendor\nunomaduro\collision\src\Adapters\Phpunit\Printers\DefaultPrinter.php:279.

My suggestion would be to add ->ignoreVendor() and it should not test in that folder. For me I don't care about testing other peoples code and only about my own. If a package I am using does have breaking issues then they will be caught during the other tests or QA.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start from the arch()->group('arch')->preset()->laravel() chain and inspect how the Laravel architecture preset discovers and checks files under vendor. Define the ignoreVendor() behavior so vendor code is excluded while project deprecations remain checked, then add or update coverage for the preset chain and run the relevant test suite.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
testing-qa
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.