mirror of
				https://github.com/getgrav/grav-plugin-admin.git
				synced 2025-11-03 20:05:53 +01:00 
			
		
		
		
	Support minimum PHP version in resource upgrades
This commit is contained in:
		@@ -5,6 +5,7 @@
 | 
				
			|||||||
    * Added option to toggle between `line-awesome` and `font-awesome` icon sets [#1334](https://github.com/getgrav/grav-plugin-admin/issues/1334)
 | 
					    * Added option to toggle between `line-awesome` and `font-awesome` icon sets [#1334](https://github.com/getgrav/grav-plugin-admin/issues/1334)
 | 
				
			||||||
1. [](#bugfix)
 | 
					1. [](#bugfix)
 | 
				
			||||||
    * Fixed issue with custom logo text overlpapping the sidebar toggle [#1334](https://github.com/getgrav/grav-plugin-admin/issues/1334)
 | 
					    * Fixed issue with custom logo text overlpapping the sidebar toggle [#1334](https://github.com/getgrav/grav-plugin-admin/issues/1334)
 | 
				
			||||||
 | 
					    * Fixed issues with minimum PHP versions in resource upgrades
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
# v1.7.0-rc.3
 | 
					# v1.7.0-rc.3
 | 
				
			||||||
## 02/15/2018
 | 
					## 02/15/2018
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -771,12 +771,15 @@ class Admin
 | 
				
			|||||||
        if ($package) {
 | 
					        if ($package) {
 | 
				
			||||||
            if ($package->dependencies) {
 | 
					            if ($package->dependencies) {
 | 
				
			||||||
                foreach ($package->dependencies as $dependency) {
 | 
					                foreach ($package->dependencies as $dependency) {
 | 
				
			||||||
                    if (count($gpm->getPackagesThatDependOnPackage($dependency)) > 1) {
 | 
					//                    if (count($gpm->getPackagesThatDependOnPackage($dependency)) > 1) {
 | 
				
			||||||
                        continue;
 | 
					//                        continue;
 | 
				
			||||||
 | 
					//                    }
 | 
				
			||||||
 | 
					                    if (isset($dependency['name'])) {
 | 
				
			||||||
 | 
					                        $dependency = $dependency['name'];
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    if (!in_array($dependency, $dependencies)) {
 | 
					                    if (!in_array($dependency, $dependencies)) {
 | 
				
			||||||
                        if (!in_array($dependency, ['admin', 'form', 'login', 'email'])) {
 | 
					                        if (!in_array($dependency, ['admin', 'form', 'login', 'email', 'php'])) {
 | 
				
			||||||
                            $dependencies[] = $dependency;
 | 
					                            $dependencies[] = $dependency;
 | 
				
			||||||
                        }
 | 
					                        }
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -354,11 +354,13 @@ class Gpm
 | 
				
			|||||||
            return false;
 | 
					            return false;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (method_exists($upgrader, 'meetsRequirements') && !$upgrader->meetsRequirements()) {
 | 
					        if (method_exists($upgrader, 'meetsRequirements') &&
 | 
				
			||||||
 | 
					            method_exists($upgrader, 'minPHPVersion') &&
 | 
				
			||||||
 | 
					            !$upgrader->meetsRequirements()) {
 | 
				
			||||||
            $error   = [];
 | 
					            $error   = [];
 | 
				
			||||||
            $error[] = '<p>Grav has increased the minimum PHP requirement.<br />';
 | 
					            $error[] = '<p>Grav has increased the minimum PHP requirement.<br />';
 | 
				
			||||||
            $error[] = 'You are currently running PHP <strong>' . PHP_VERSION . '</strong>';
 | 
					            $error[] = 'You are currently running PHP <strong>' . phpversion() . '</strong>';
 | 
				
			||||||
            $error[] = ', but PHP <strong>' . GRAV_PHP_MIN . '</strong> is required.</p>';
 | 
					            $error[] = ', but PHP <strong>' . $upgrader->minPHPVersion() . '</strong> is required.</p>';
 | 
				
			||||||
            $error[] = '<p><a href="http://getgrav.org/blog/changing-php-requirements-to-5.5" class="button button-small secondary">Additional information</a></p>';
 | 
					            $error[] = '<p><a href="http://getgrav.org/blog/changing-php-requirements-to-5.5" class="button button-small secondary">Additional information</a></p>';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            Installer::setError(implode("\n", $error));
 | 
					            Installer::setError(implode("\n", $error));
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user