File tree Expand file tree Collapse file tree 2 files changed +26
-1
lines changed
Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change 2323 "dev-master" : " 1.3.x-dev"
2424 }
2525 },
26+ "bin" : [" textconsole" ],
2627 "require" : {
2728 "php" : " >=7" ,
2829 "yooper/stop-words" : " ~1" ,
Original file line number Diff line number Diff line change 22<?php
33// application.php
44
5- require 'vendor/autoload.php ' ;
5+ foreach (
6+ [
7+ __DIR__ . '/../autoload.php ' ,
8+ __DIR__ . '/../../autoload.php ' ,
9+ __DIR__ . '/../vendor/autoload.php ' ,
10+ __DIR__ . '/vendor/autoload.php ' ,
11+ __DIR__ . '/../../vendor/autoload.php '
12+ ] as $ file
13+ ) {
14+ if (file_exists ($ file )) {
15+ define ('AUTOLOAD_PHP_FILE ' , $ file );
16+ break ;
17+ }
18+ }
19+
20+ if (!defined ('AUTOLOAD_PHP_FILE ' )) {
21+ fwrite (STDERR ,
22+ 'You need to set up the project dependencies using the following commands: ' . PHP_EOL .
23+ 'wget http://getcomposer.org/composer.phar ' . PHP_EOL .
24+ 'php composer.phar install ' . PHP_EOL
25+ );
26+ die (1 );
27+ }
28+
29+ require AUTOLOAD_PHP_FILE ;
630
731use TextAnalysis \Console \Commands \NltkPackageListCommand ;
832use TextAnalysis \Console \Commands \NltkPackageInstallCommand ;
You can’t perform that action at this time.
0 commit comments