Skip to content

Latest commit

 

History

History
102 lines (76 loc) · 2.56 KB

UPGRADE-2.0.md

File metadata and controls

102 lines (76 loc) · 2.56 KB

UPGRADE FROM 1.x to 2.0

Renamed configuration option cache to path.

Before

gpslab_geoip:
    cache: '%kernel.cache_dir%/GeoLite2-City.mmdb'

After

gpslab_geoip:
    path: '%kernel.cache_dir%/GeoLite2-City.mmdb'

Update composer.json if you use composer event callbacks.

Before in Symfony <3.0

{
    "scripts": {
        "post-install-cmd": [
            "GpsLab\\Bundle\\GeoIP2Bundle\\Composer\\ScriptHandler::updateDatabase"
        ],
        "post-update-cmd": [
            "GpsLab\\Bundle\\GeoIP2Bundle\\Composer\\ScriptHandler::updateDatabase"
        ]
    }
}

Before in Symfony >3.1

{
    "scripts": {
        "symfony-scripts": [
            "GpsLab\\Bundle\\GeoIP2Bundle\\Composer\\ScriptHandler::updateDatabase"
        ]
    }
}

After in Symfony >4

{
    "scripts": {
        "auto-scripts": {
              "geoip2:update": "symfony-cmd"
        }
    }
}

Update database command

The update database command (geoip2:update) split into two separate commands.

  • geoip2:download - command for download some not configured database from URL to specific path.
  • geoip2:update - command for update configured databases.

Renamed

  • The gpslab.command.geoip2.update service renamed to GpsLab\Bundle\GeoIP2Bundle\Command\DownloadDatabaseCommand.
  • The GpsLab\Bundle\GeoIP2Bundle\Command\UpdateDatabaseCommand class renamed to GpsLab\Bundle\GeoIP2Bundle\Command\DownloadDatabaseCommand.
  • The geoip2:update console command renamed to geoip2:download.

Removed

  • The gpslab.geoip2.component.gzip service removed.
  • The ScriptHandler removed.

Updating Dependencies

Require PHP extensions

  • Require the Phar extension.
  • Require the Zlib extension.

Require packages

  • Require the symfony/filesystem package.
  • Require the symfony/config package.
  • The symfony/http-kernel package moved from require-dev to require.
  • The symfony/dependency-injection package moved from require-dev to require.
  • The symfony/expression-language package moved from require-dev to require.
  • The symfony/console package moved from require-dev to require.

Removed packages

  • The symfony/stopwatch package removed from dependencies.
  • The gpslab/compressor package removed from dependencies.
  • The scrutinizer/ocular package removed from dependencies.
  • The satooshi/php-coveralls package removed from dependencies.