From 0ea8cb6561f118b047d61136325b16443f50355f Mon Sep 17 00:00:00 2001 From: Aaron Holbrook Date: Tue, 21 Mar 2017 13:16:19 -0500 Subject: [PATCH] Change limits of recursion --- composer.json | 2 +- src/autoload.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 8b978ac..2eebd19 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,7 @@ "description": "Automatically and recursively require_once all php files in a given directory.", "type": "library", "license": "UNLICENSE", - "version": "2.0.3", + "version": "2.0.4", "authors": [ { "name": "A7", diff --git a/src/autoload.php b/src/autoload.php index a2d1a72..010f07b 100644 --- a/src/autoload.php +++ b/src/autoload.php @@ -17,11 +17,11 @@ function autoload( $directory, $recurse = false ) { $recurse_depth++; } - if ( $recurse_depth > 5 ) { - trigger_error( 'Using autoload for more than 5 directories is not recommended', E_USER_WARNING ); + if ( $recurse_depth > 10 ) { + trigger_error( 'Using autoload for more than 10 directories is not recommended', E_USER_WARNING ); } - if ( $recurse_depth > 7 ) { + if ( $recurse_depth > 15 ) { throw new \Exception( 'Maximum recurse depth reached for autoload.' ); }