chore: drop the unused package skeleton residue - #22
Merged
Conversation
The package has no Eloquent models and ships no views, but it still carried the scaffolding for both from the spatie skeleton it was generated from. database/factories/ModelFactory.php defined nothing at all: the class body sat inside a comment block, so the file was an empty namespace declaration that the composer autoloader was nevertheless mapped to. resources/views held only a .gitkeep. TestCase pointed Eloquent's factory name resolution at that empty namespace and carried a commented-out migration loop. PHPStan was told to check model properties and to analyse the database directory. None of it was reachable. Removing it is a no-op.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This package parses XML. It has no Eloquent models, no migrations and no views. It was still carrying the scaffolding for all three from the spatie package skeleton it was generated from.
What was there
database/factories/ModelFactory.phpdefined nothing. The entire class body was inside a comment block:So
PlinCode\KmlParser\Database\Factories\ModelFactoryhas never existed as a class. The file was a namespace declaration and an unused import, with a PSR-4 autoload entry incomposer.jsonpointing at it.tests/TestCase.phpaimed Eloquent's factory name resolution at that empty namespace insetUp(), and carried a commented-out migration loop ingetEnvironmentSetUp().resources/views/held a single.gitkeep. The service provider only callshasConfigFile(), so no view is ever registered or published.phpstan.neon.distlisteddatabaseas a path to analyse and setcheckModelProperties: true, a rule about Eloquent models, of which there are none.What changed
database/andresources/PlinCode\KmlParser\Database\Factories\PSR-4 entry fromcomposer.jsondatabasefrom the PHPStan paths and removedcheckModelPropertiesTestCaseto the one thing it actually does, registering the service providercheckOctaneCompatibility: truestays. That one is relevant, the parser holds request state.Risk
Nothing referenced any of it, and the one class that could have been referenced was never defined. Suite still 65 passing, PHPStan
[OK] No errors, Pint clean.The removed autoload entry means
composer dump-autoloadproduces a slightly smaller classmap. Nothing else observable changes.