feat: replace thecodingmachine/class-explorer with kcs/class-finder#664
feat: replace thecodingmachine/class-explorer with kcs/class-finder#664oojacoboo merged 7 commits intothecodingmachine:masterfrom
Conversation
Main issue is to let type mappers find types in vendor packages which class-explorer and maintainer is not updating the project. Symfony and Laravel bundles have to be updated too. Fixes: thecodingmachine#657
|
It seems to me that because of this However the other would still be broken - anything that requires autoloading won't function as expected. One example of that - our pre-8.0 enums require special autoloader to call I've taken a look at the issue that's mentioned in alekitto's package to see what was the root of the problem that made them use If you just do class_exists('Aws\functions');
class_exists('Aws\functions');it breaks. So the worst thing here is it does indeed look like Composer's bug that they don't want to fix :/ Now it makes sense to me why both Symfony and Spiral parse the file to see if it contains a class before trying to autoload it. To be honest I don't like either solution. We could still try two things - re-reporting this as a bug with a clearer example to That solution would satisfy both needs without compromises if it works :/ |
|
I've submitted an issue on the class-finder side. Maybe we can get the fix done on their side 🤷🏻 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #664 +/- ##
============================================
- Coverage 95.72% 95.27% -0.45%
- Complexity 1773 1824 +51
============================================
Files 154 171 +17
Lines 4586 4848 +262
============================================
+ Hits 4390 4619 +229
- Misses 196 229 +33 ☔ View full report in Codecov by Sentry. |
As each condition applied to finder stays there each place it is applied should be done on cloned instance to avoid accumulation. Main instance of finder is kept with all the conditions provided during configuring. NS is created only from NSFctory where it's cloned so no need to add same clone inside NS.
|
@fogrye this looks good - thanks! It's a BC breaking PR. That's fine though, as we're targeting a new major version for the next tag. |
Main issue is to let type mappers find types in vendor packages which class-explorer and maintainer is not updating the project.
Symfony and Laravel bundles have to be updated too. Fixes: #657