Skip to content

Commit ff5082f

Browse files
authored
Merge pull request #1440 from EasyEngine/update/migrations
Update migrations and img versions for PHP update
2 parents bb913b9 + 6831df4 commit ff5082f

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

img-versions.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44
"easyengine/mariadb": "v4.0.0",
55
"easyengine/nginx-proxy": "v4.0.3",
66
"easyengine/nginx": "v4.0.3",
7-
"easyengine/php": "v4.0.3",
7+
"easyengine/php": "v4.1.0",
88
"easyengine/php5.6": "v4.0.0",
9-
"easyengine/php7.0": "v4.0.0",
10-
"easyengine/php7.3": "v4.0.0",
9+
"easyengine/php7.0": "v4.1.0",
10+
"easyengine/php7.2": "v4.1.0",
11+
"easyengine/php7.3": "v4.1.0",
12+
"easyengine/php7.4": "v4.1.0",
1113
"easyengine/postfix": "v4.0.0",
1214
"easyengine/redis": "v4.0.0",
1315
"easyengine/newrelic-daemon": "v4.0.0"

php/EE/Migration/CustomContainerMigrations.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ private static function get_migration_path( $migration_name ) {
207207
*/
208208
private static function get_migration_class_name( $migration_name ) {
209209
// Remove date and package name from it
210-
$class_name = preg_replace( '/(^\d*)[_]([a-zA-Z-]*[_])/', '', rtrim( $migration_name, '.php' ) );
210+
$class_name = preg_replace( '/(^\d*)[_]([a-zA-Z-]*[_])/', '', substr( $migration_name, 0, -4 ) );
211211
// Convet snake_case to CamelCase
212212
$class_name = self::camelize( $class_name );
213213
// Replace dot with underscore

php/class-ee-docker.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,11 @@ public static function create_volumes( $prefix, $volumes, $update_to_docker_pref
253253
if ( ! empty( $volume['skip_volume'] ) && true === $volume['skip_volume'] ) {
254254
continue;
255255
}
256+
$vol_check = EE::launch( 'docker volume inspect ' . $volume_prefix . '_' . $volume['name'] );
257+
// Skip if volume already exists.
258+
if ( 0 === $vol_check->return_code ) {
259+
continue;
260+
}
256261
$path_to_symlink_not_empty = ! empty( dirname( $volume['path_to_symlink'] ) );
257262
if ( $path_to_symlink_not_empty ) {
258263
$fs->mkdir( dirname( $volume['path_to_symlink'] ) );

0 commit comments

Comments
 (0)