Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can the plugin support excluding folders? #16

Closed
cxcatir opened this issue Apr 22, 2024 · 3 comments
Closed

Can the plugin support excluding folders? #16

cxcatir opened this issue Apr 22, 2024 · 3 comments

Comments

@cxcatir
Copy link

cxcatir commented Apr 22, 2024

Is your feature request related to a problem? Please describe.

Some folders contain numerous files, making it difficult to list them one by one. Is it possible to implement functionality to exclude certain folders?

Describe the solution you'd like

It might be possible to define such a format in the "extra" section of the composer.json file, allowing for the exclusion of specified folders.

    "extra": {
        "exclude-from-folders": [
            "illuminate/support/"
        ]
    },
@mcaskill
Copy link
Owner

That's a good idea. When I have a chance I'll explore possible solutions.

Taking laravel/framework for example, I would probably just add glob support to exclude-from-files:

"extra": {
    "exclude-from-files": [
        "laravel/framework/src/*/helpers.php"
    ]
}

Thanks

mcaskill added a commit that referenced this issue May 4, 2024
Moved file exclusion matching to value object classes `Path` and `Paths`. Provides support for wildcard exclusions using an asterisk:

```json
"extra": {
    "exclude-from-files": [
        "laravel/framework/src/*/helpers.php"
    ]
}
```

Changed:
- Refactored tests to decouple set-up and tear-down, sort methods by visibility and alphabetically, and improve static analysis.
- Updated tests to support meta-packages and immutable packages.
- Fixed support for `InstallationManager` before and after Composer v2.5.6.

Resolves #16
@mcaskill
Copy link
Owner

mcaskill commented May 4, 2024

@cxcatir Can you test out the main branch (522d75f) and confirm this works as intended?

@mcaskill mcaskill reopened this May 4, 2024
@cxcatir
Copy link
Author

cxcatir commented May 6, 2024

@mcaskill The plugin test looks fine. But I think I'm getting something wrong and it's not solving my requirement scenario.

I want to develop a package, and the tests inside pacakge will have a complete application and install the package I'm developing, using the path repository.
In the application, composer dump auto load encounters an infinite loop. I thought that using this plugin to exclude the test folder of the test application would solve the problem, but it didn't!

development-package
--test
----application which installs development-package

I think I still need to re-learn how composer works. But thanks for the new glob support!

@mcaskill mcaskill closed this as completed May 6, 2024
mcaskill added a commit that referenced this issue May 19, 2024
Moved file exclusion matching to value object classes `Path` and `Paths`. Provides support for wildcard exclusions using an asterisk:

```json
"extra": {
    "exclude-from-files": [
        "laravel/framework/src/*/helpers.php"
    ]
}
```

Changed:
- Refactored tests to decouple set-up and tear-down, sort methods by visibility and alphabetically, and improve static analysis.
- Updated tests to support meta-packages and immutable packages.
- Fixed support for `InstallationManager` before and after Composer v2.5.6.

Resolves #16
mcaskill added a commit that referenced this issue May 19, 2024
Moved file exclusion matching to value object classes `Path` and `Paths`. Provides support for wildcard exclusions using an asterisk:

```json
"extra": {
    "exclude-from-files": [
        "laravel/framework/src/*/helpers.php"
    ]
}
```

Changed:
- Refactored tests to decouple set-up and tear-down, sort methods by visibility and alphabetically, and improve static analysis.
- Updated tests to support meta-packages and immutable packages.
- Fixed support for `InstallationManager` before and after Composer v2.5.6.

Resolves #16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants