Comments (4)
could you please provide your composer.json
file?
- No, sadly not at the moment
- We need to scan all autoloaded files, but there may be a misconfigured autoload section, so I'd like to check the
composer.json
- Afaik, not now, but files that are not required by your application or not in the autoload section should not be parsed. Test-Files, like listed in the output should be in
autoload-dev
and not be parsed.
from composerrequirechecker.
composer.json
is as following:
{
"name": "laravel-modules/boilerplate",
"description": "",
"license": "proprietary",
"require": {
"php": ">=7.2.0",
"laravel-modules/core": "^4.0"
},
"require-dev": {
"codedungeon/phpunit-result-printer": "^0.24.1",
"internations/http-mock": "^0.12.1",
"jakub-onderka/php-console-highlighter": "^0.3.2",
"jakub-onderka/php-parallel-lint": "^1.0",
"localheinz/composer-normalize": "^1.1",
"maximum/code-sniffer-rules": "^2.0",
"mockery/mockery": "^1.2",
"phpunit/phpunit": "^7.5",
"sensiolabs/security-checker": "^5.0"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"laravel": {
"providers": [
...
]
}
},
"autoload": {
"psr-4": {
"Modules\\Boilerplate\\": ""
}
},
"repositories": [
{
"type": "composer",
"url": "[FILTERED]",
"options": {
"http": {
"header": [
"X-TOKEN: [FILTERED]"
]
}
}
}
],
"scripts": {
"fix-style": "vendor/bin/phpcbf --standard=phpcs.xml",
"lint": "vendor/bin/parallel-lint --exclude vendor . --colors",
"security-checker": "vendor/bin/security-checker security:check composer.lock",
"style": "vendor/bin/phpcs --standard=phpcs.xml"
}
}
laravel-modules/core
is a company package with the following composer.json
:
{
"name": "laravel-modules/core",
"description": "",
"license": "proprietary",
"require": {
"php": ">=7.2.0",
"ext-json": "*",
"ext-simplexml": "*",
"dimsav/laravel-translatable": "^9.2",
"doctrine/dbal": "^2.7",
"guidocella/eloquent-insert-on-duplicate-key": "^2.2",
"guzzlehttp/guzzle": "^6.3",
"laracasts/utilities": "^3.0",
"laravel/framework": "5.7.*",
"laravel/horizon": "^3.0",
"laravel/telescope": "^1.0",
"maatwebsite/laravel-sidebar": "~2.1",
"maximum/laravel-modules": "^3.3",
"nanigans/single-table-inheritance": "^0.8.7",
"owen-it/laravel-auditing": "^8.0",
"predis/predis": "^1.1",
"renatomarinho/laravel-page-speed": "^1.8",
"rtconner/laravel-tagging": "^3.0",
"sentry/sentry-laravel": "^0.11",
"sofa/eloquence": "^5.6",
"spatie/laravel-analytics": "^3.6",
"stevenmaguire/laravel-middleware-csp": "~0.1",
"tymon/jwt-auth": "0.5.*",
"zizaco/entrust": "^1.9"
},
"require-dev": {
"codedungeon/phpunit-result-printer": "^0.24.1",
"internations/http-mock": "^0.12.1",
"jakub-onderka/php-console-highlighter": "^0.3.2",
"jakub-onderka/php-parallel-lint": "^1.0",
"localheinz/composer-normalize": "^1.1",
"maximum/code-sniffer-rules": "^2.0",
"mockery/mockery": "^1.2",
"phpunit/phpunit": "^7.5",
"sensiolabs/security-checker": "^5.0"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"laravel": {
"providers": [
...
],
"aliases": {
...
}
}
},
"autoload": {
"psr-4": {
"Modules\\Core\\": ""
},
"files": [
"Helpers/global_functions.php"
]
},
"repositories": [
{
"type": "composer",
"url": "[FILTERED]",
"options": {
"http": {
"header": [
"X-TOKEN: [FILTERED]"
]
}
}
}
],
"scripts": {
"fix-style": "vendor/bin/phpcbf --standard=phpcs.xml",
"lint": "vendor/bin/parallel-lint --exclude vendor . --colors",
"security-checker": "vendor/bin/security-checker security:check composer.lock",
"style": "vendor/bin/phpcs --standard=phpcs.xml"
}
}
the package with the syntax error seems to be jakub-onderka/php-parallel-lint
from composerrequirechecker.
The "Problem" in this case are the autoload sections. They cause composer-require-checker
to parse ALL files within the root directory.
There should be a subfolger with your php files, like "src" or whatever you like to call it, and your autoload-sections should only point to this directory.
"autoload": {
"psr-4": {
"Modules\\Boilerplate\\": ""
}
},
and
"autoload": {
"psr-4": {
"Modules\\Core\\": ""
},
"files": [
"Helpers/global_functions.php"
]
},
from composerrequirechecker.
Thanks for getting back to me. Due to a holiday I wasn't able to respond any sooner.
It seems you'r right, putting files in a src
directory does fix the issue.
packages mentioned here are Modules loaded by nwidart/laravel-modules
It's gonna be a bit of a challenge to get those packages working in a sub-directory, since they contain some legacy code with hardcoded paths (I know, I know) and I'm also not sure how the laravel-modules package will respond to those changes. I'll put it on my backlog for now since it's quite a major overhaul
Thanks for helping me understand this one anywaay!
from composerrequirechecker.
Related Issues (20)
- [Question] Monorepo setup HOT 12
- Dependency Dashboard
- Switch default branch to `4.6.x` HOT 3
- False positive on Laravel\Illuminate packages HOT 4
- There were no symbols found Error HOT 4
- Distribution using phive & composer HOT 5
- Feature request; take into account require-dev and suggest HOT 6
- GPG signature failed while tagging HOT 6
- PHP Attributes support HOT 3
- False negative when not updating .lock correctly HOT 12
- How to skip particular file HOT 6
- Warning: preg_match(): Compilation failed: unrecognized character HOT 15
- Unknown symbol mongodb\driver\monitoring\addsubscriber HOT 6
- Misleading error message when running on non-compatible php version HOT 1
- QuadernoBase and all Quaderno classes are unknown HOT 1
- Detect dependencies that aren't used HOT 3
- White list ignored with phar HOT 2
- Add support `nikic/php-parser` of version `^5` HOT 1
- `scan-files` does not work HOT 14
- Do I need this package when I use static analyzer? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from composerrequirechecker.