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

copy third-party libs instead of using Composer autoloader (#256) #260

Merged
merged 1 commit into from
Sep 22, 2023

Conversation

stklcode
Copy link
Contributor

fixes #256

The autoloader mechanism is quite heavy for a single dependency and requires composer and vendor dir to be part of the final product.

We yet have generated/minified resources in our project, so this is the minimalistic approach to copy the CrawlerDetect lib, too and extend the custom autoloader mechanism.


This is not a pretty solution, but the project is not really Composer compatible. (no PSR-4 namespaces, requirement for minified files that are generated from dev-dependencies, etc.).

This way we ca postpone the decision to heavily rework the project structures while having a runnable artifact again.

@stklcode stklcode added the bug label Mar 31, 2023
@stklcode stklcode added this to the 2.0.0 milestone Mar 31, 2023
stklcode added a commit that referenced this pull request Sep 17, 2023
The autoloader mechanism is quite heavy for a single dependency and
requires composer and vendor dir to be part of the final product.

We yet have generated/minified resources in our project, so this is the
minimalistic approach to copy the CrawlerDetect lib, too and extend the
custom autoloader mechanism.
@pluginkollektiv pluginkollektiv deleted a comment from sonarcloud bot Sep 17, 2023
@florianbrinkmann
Copy link
Member

The only thing missing here would be to add the CrawlerDetect file(s) to the lib folder, right?

stklcode added a commit that referenced this pull request Sep 17, 2023
The autoloader mechanism is quite heavy for a single dependency and
requires composer and vendor dir to be part of the final product.

We yet have generated/minified resources in our project, so this is the
minimalistic approach to copy the CrawlerDetect lib, too and extend the
custom autoloader mechanism.
stklcode added a commit that referenced this pull request Sep 17, 2023
The autoloader mechanism is quite heavy for a single dependency and
requires composer and vendor dir to be part of the final product.

We yet have generated/minified resources in our project, so this is the
minimalistic approach to copy the CrawlerDetect lib, too and extend the
custom autoloader mechanism.
@stklcode
Copy link
Contributor Author

You're right, seems the line got lost at some point. Re-added the missing directory to the copy-file list in composer.json, so it's populated after composer install

@stklcode stklcode self-assigned this Sep 17, 2023
Copy link
Member

@florianbrinkmann florianbrinkmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

The autoloader mechanism is quite heavy for a single dependency and
requires composer and vendor dir to be part of the final product.

We yet have generated/minified resources in our project, so this is the
minimalistic approach to copy the CrawlerDetect lib, too and extend the
custom autoloader mechanism.
@sonarcloud
Copy link

sonarcloud bot commented Sep 22, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@stklcode stklcode merged commit 75b2198 into develop Sep 22, 2023
17 checks passed
@stklcode stklcode deleted the fix/256-composer branch September 22, 2023 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Composer dependencies and autoloader missing in deployment
2 participants