Skip to content

Commit

Permalink
Use PSR-4 autoloader (#199)
Browse files Browse the repository at this point in the history
* Use PSR-4 autoloader

* Remove deprecated autoloader
* Use new classloading mechanism

* Fix autoloader tests

* Additional autoloader testing
  • Loading branch information
R0Wi authored Apr 9, 2023
1 parent 4bdaaaa commit 97f33cc
Show file tree
Hide file tree
Showing 7 changed files with 242 additions and 150 deletions.
17 changes: 14 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,26 @@
"phpunit/phpcov": "8.2.*",
"nextcloud/coding-standard": "^1.0",
"vimeo/psalm": "^4.23",
"christophwurst/nextcloud": "dev-master"
"nextcloud/ocp": "dev-master"
},
"config": {
"optimize-autoloader": true,
"classmap-authoritative": true,
"platform": {
"php": "8.0"
}
},
"autoloader-suffix": "WorkflowOcr"
},
"autoload": {
"psr-4": {
"OCA\\WorkflowOcr\\": "lib/"
}
},
"autoload-dev": {
"psr-4": {
"OCP\\": "vendor/nextcloud/ocp/OCP"
}
},
"scripts": {
"lint": "find . -name \\*.php -not -path './vendor/*' -not -path './node_modules/*' -exec php -l \"{}\" \\;",
"cs:check": "php-cs-fixer fix --dry-run --diff",
Expand All @@ -27,5 +38,5 @@
"psalm:clear": "psalm --clear-cache && psalm --clear-global-cache",
"psalm:fix": "psalm --alter --issues=InvalidReturnType,InvalidNullableReturnType,MissingParamType,InvalidFalsableReturnType",
"psalm:write-baseline": "psalm --threads=1 --set-baseline=./tests/psalm-baseline.xml"
}
}
}
Loading

0 comments on commit 97f33cc

Please sign in to comment.