Skip to content

Commit 027336a

Browse files
committed
Prepare Laravel package dependencies
1 parent b8b9368 commit 027336a

3 files changed

Lines changed: 30 additions & 7 deletions

File tree

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright © Steve Bauman
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

composer.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@
55
"type": "library",
66
"require": {
77
"php": "^8.2",
8-
"directorytree/privacy-filter-classifier": "^1.0",
9-
"illuminate/console": "^11.0|^12.0",
8+
"ext-zip": "*",
109
"illuminate/http": "^11.0|^12.0",
11-
"illuminate/support": "^11.0|^12.0"
10+
"illuminate/console": "^11.0|^12.0",
11+
"illuminate/support": "^11.0|^12.0",
12+
"directorytree/privacy-filter-classifier": "^1.0"
1213
},
1314
"require-dev": {
1415
"laravel/pint": "^1.0",

src/PrivacyFilterServiceProvider.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use DirectoryTree\PrivacyFilter\Commands\InstallCommand;
77
use DirectoryTree\PrivacyFilter\Commands\InstallModelCommand;
88
use DirectoryTree\PrivacyFilterClassifier\Classifier;
9+
use Illuminate\Contracts\Foundation\Application;
910
use Illuminate\Support\ServiceProvider;
1011

1112
/**
@@ -20,11 +21,11 @@ public function register(): void
2021
{
2122
$this->mergeConfigFrom(__DIR__.'/../config/privacy-filter.php', 'privacy-filter');
2223

23-
$this->app->singleton(Classifier::class, function () {
24+
$this->app->singleton(Classifier::class, function (Application $app) {
2425
return new Classifier(
25-
binaryPath: config('privacy-filter.paths.binary'),
26-
modelPath: config('privacy-filter.paths.model'),
27-
timeout: config('privacy-filter.process.timeout'),
26+
binaryPath: $app['config']->get('privacy-filter.paths.binary'),
27+
modelPath: $app['config']->get('privacy-filter.paths.model'),
28+
timeout: $app['config']->get('privacy-filter.process.timeout'),
2829
);
2930
});
3031
}

0 commit comments

Comments
 (0)