File tree Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -232,8 +232,26 @@ private static function find_classes( $path ) {
232232
233233if ( file_exists ( __DIR__ . '/../vendor/autoload.php ' ) ) {
234234 require_once __DIR__ . '/../vendor/autoload.php ' ;
235- } elseif ( file_exists ( dirname ( dirname ( dirname ( __DIR__ ) ) ) . '/autoload.php ' ) ) {
236- require_once dirname ( dirname ( dirname ( __DIR__ ) ) ) . '/autoload.php ' ;
235+ } else {
236+ try {
237+ \spl_autoload_register ( function ( $ class ) {
238+ $ base_dir = dirname ( dirname ( dirname ( __DIR__ ) ) );
239+ if ( file_exists ( $ base_dir . '/symfony/finder/Finder.php ' ) ) {
240+ if ( false === strpos ( $ class , 'Symfony\Component\Finder \\' ) ) {
241+ } else {
242+ $ class = explode ( 'Symfony\Component\Finder \\' , $ class );
243+ if ( isset ( $ class [1 ] ) ) {
244+ $ class = $ class [1 ] . '.php ' ;
245+ if ( file_exists ( $ base_dir . '/symfony/finder/ ' . $ class ) ) {
246+ require_once $ base_dir . '/symfony/finder/ ' . $ class ;
247+ }
248+ }
249+ }
250+ }
251+ } );
252+ } catch ( Exception $ exception ) {
253+ echo 'Error : ' . $ exception ->getMessage ();
254+ }
237255}
238256
239257$ config_file = ( isset ( $ argv [1 ] ) ) ? $ argv [1 ] : false ;
You can’t perform that action at this time.
0 commit comments