Skip to content

@anlutro anlutro released this May 20, 2016 · 11 commits to master since this release

Fixes a bug where params and constructor_params weren't being set when using $router->mount or a routing configuration file.

Assets 2

@anlutro anlutro released this Dec 2, 2015 · 15 commits to master since this release

Breaking changes

The Autarky\Session namespace has been removed. Classes previously there are now in the Autarky\Http namespace, most notably Autarky\Http\SessionProvider.

It is recommended you register Autarky\Http\CookieProvider.

The error handler no longer calls ini_set('display_errors', 0). You should ensure that this setting is 0 in your php.ini. You can add the ini_set() call in your app/start.php if you can't set it globally.

Router::onBefore has been renamed to Router::addBeforeHook, and Router::onAfter has been renamed to Router::addAfterHook.

Route URL generation is a bit more strict - provided parameters must match the defined route parameter's regex if it has one.

New features

Autarky\Http\CookieQueue is a "global" class that lets services add cookies to the current main request, without having to have access to a response object.

It is now possible to configure a route's dependency injection through routes.yml. See #61

Assets 2

@anlutro anlutro released this May 1, 2015 · 71 commits to master since this release

  • You can now pass null as password in a database config.
  • Sessions are no longer always started unless session.force is set to true in the config.
Assets 2

@anlutro anlutro released this Apr 3, 2015 · 79 commits to master since this release

Version 0.9 marks the 1 year anniversary of Autarky! 🎉

Breaking changes

Configuration and Twig namespaces

Namespaces have been removed from Config. Instead, external config files should be "mounted" onto paths in the config loader. See #57 and #58

In the twig-templating packages, namespaces have been changed to behave as it does by default in Twig (@namespace/path/to/template).


  • ErrorHandlerInterface::handles(Exception $e) has been removed. Return early from handle(Exception $e) instead.
  • Support namespace renamed to Utils.
  • ArrayUtils class renamed to ArrayUtil.
  • FastRoute updated to version 0.4.


Autarky\Provider has been deprecated in favour of Autarky\Providers\AbstractProvider. It will be removed in the next release. Other than the name, the class is exactly the same as before.

New features

  • Service providers can now define dependencies by extending Autarky\Providers\AbstractDependantProvider. See #44
Assets 2

@anlutro anlutro released this Mar 3, 2015 · 111 commits to master since this release

Fix a bug with ArrayUtils::has when trying to access a nested key of a non-array member.

Assets 2

@anlutro anlutro released this Feb 21, 2015 · 125 commits to master since this release

Made some internal changes to make it easier to remove unwanted parts of the framework.

  • HttpKernel now works without an error handler
  • The router now correctly works when no event dispatcher is set
  • The YAML config loader now works without a cache path
Assets 2

@anlutro anlutro released this Feb 20, 2015 · 130 commits to master since this release

Breaking changes

options in database connection config arrays should now be pdo_options.

Twig integration removed

Twig has been removed from the framework itself and is now an entirely separate package. Add autarky/twig: ~1.0 to your composer.json. You also need to make the following changes in your codebase:

  • Replace any references to the Autarky\Templating namespace with Autarky\TwigTemplating

BrowserKit removed

If you were using the Autarky TestCase class to make request towards your app using the $this->client BrowserKit Client object, you'll need to make the following changes:

  • Add symfony/browser-kit: ~2.3 to your composer.json
  • Replace any references to Autarky\Testing\TestCase with Autarky\Testing\WebTestCase

Classes renamed

Some classes have moved namespaces and/or have been renamed:

  • Autarky\Kernel\Application is now Autarky\Application
  • Autarky\Kernel\ServiceProvider is now Autarky\Provider
  • Autarky\Kernel\ConfiguratorInterface is now Autarky\ConfiguratorInterface

Features and bugfixes

Cache file operations now use file locks to prevent edge cases where if two writes are happening at the same time, the file would get corrupted.

The default configurators that come with 0.7's skeleton (in the src/Config directory) have been re-implemented inside Autarky, so unless you've made changes to them or think you will in the future, you can delete them and replace them with the Autarky namespaced defaults, as shown here.

If you have made changes to these configurators, take a look at the new ones in the Autarky source code - they've been written to be easy to extend for modification.

The ErrorHandlingConfigurator has been removed in favour of an error_handlers array in config/app - see #54 for more information, and here for a reference on what to add to your config file.

Improved database connection config syntax - see the skeleton project's database config file for a reference.

The skeleton project now comes with vlucas/phpdotenv installed.

Assets 2

@anlutro anlutro released this Feb 17, 2015 · 174 commits to master since this release

Fixed a bug that could cause multiple unnecessary writes to the YAML cache, potentially corrupting data.

Assets 2

@anlutro anlutro released this Jan 14, 2015 · 184 commits to master since this release

Container factory improvements (#50)

Container::define() has been remade for more flexibility and performance. It is now possible to bypass reflection entirely, and there are no arbitrary limits to what arguments are passed to a factory callable.

If you run into problems with existing code, try type-hinting the container argument to callables (closures and arrays of object + method name) passed to Container::define() - for example:

// old
$container->define('MyClass', function($container) { ... });

// new
use Autarky\Container\ContainerInterface;
$container->define('MyClass', function(ContainerInterface $container) { ... });

For more information on the new container features, check out the wiki.


Added configurator classes, which provides an alternative to service providers which really only provide a config callback. Configurator classes can use dependency injection, making it easy to inject the classes you need.

There is a new class, Autarky\Logging\ChannelManager, which can contain multiple instances of Psr\Log\LoggerInterface and allows seamless switching between them and easy injection of different channels into different classes (see #50).

All configuration of logging has been moved to userland. See the LogConfigurator class in the new app skeleton for an example on how to do this.

#34 'Class:method' syntax has been removed in favour of ['Class', 'method']. It is still possible to pass just 'ClassName' in cases where you want the default method to be invoked.

#47 There is a new compact route config syntax for registering multiple controllers on the same URL - one controller for each HTTP method.

#45 The exception handler now allows handlers to throw new exceptions, which can then be handled by another handler.

#41 You can now configure the session storage implementation to use. The "" config options are "native" (default), "bridge", "mock_array" and "mock_file". As a consequence of this, the "session.mock" config has been deprecated and will be removed in 0.8. Use " = mock_array" instead.

#42 There is now a "session.write_check" boolean config that wraps the session handler in a WriteCheckSessionHandler proxy, which will only write to the session if anything has changed, improving performance in some setups.

MultiPdoContainer renamed to ConnectionManager.

Assets 2

@anlutro anlutro released this Oct 29, 2014 · 266 commits to master since this release

Fixed a bug where you'd get a fatal error if trying to use $config->get('') but was not an array - it will now correctly return the default value. For example:

# app/config.yml
foo: 'bar'
$config->get('', $default);
Assets 2
You can’t perform that action at this time.