Skip to content

Releases: AntCMS-org/AntLoader

Version 2.0.4

12 Mar 22:30
4104de0
Compare
Choose a tag to compare

Enhancements

  • Various improvements to the code quality.
  • Unneeded files are now excluded from the package, reducing the overall size by about 150KB

Version 2.0.3

20 Nov 19:37
fcf0f55
Compare
Choose a tag to compare

New Features

  • Added a new "memory" classmap option which allows AntLoader to load a classmap and only store it into memory. This is not a very performant option, however it may be useful in some cases due to the fact that the composer/class-map-generator package generates a classmap regardless of PSR0 / PSR4

Version 2.0.2

03 Oct 13:19
ce5aeeb
Compare
Choose a tag to compare

Bug Fixes

  • Resolved a few minor issues with the APCu cache implementation.

New Features

  • You can now call pruneClassmap to prune the classmap of any non-existent classes. This function will return the number of classes that were pruned.

Enhancements

  • Test coverage has been enabled in the unit tests, requiring at a minimum 90% coverage.
  • Improvements to the existing tests have been done, bringing the test coverage up to 97%.

Version 2.0.1

08 Jun 06:50
b0f3b48
Compare
Choose a tag to compare

New Features

  • When calling the register function, you can now pass true to the function to have AntLoader to be prepended to the beginning of the PHP autoloader list. This causes it to be used before any other autoloader that is registered.

Changes

  • Rather than using __DIR__ to create the APCu cache key, __FILE__ is now used.
  • Minor improvements to the code.
  • Readme improvements, including updated benchmark info.

Version 2.0.0

27 May 09:02
19c70b9
Compare
Choose a tag to compare

Breaking Changes

  • addPrefix has been renamed to addNamespace to better fit it's actual use-case.
  • AntLoader is now configured by passing an array when constructing it.

Example using all available configuration options (all are optional):

$config = [
    'mode' => 'auto', // Can be 'auto', 'filesystem', 'apcu', or 'none'.
    'path' => '/path/to/save/classmap.php', // Where should AntLoader store the classmap if the file system cache option is used.
    'key' => 'customApcuKey', // The APCu key used when storing the classmap. This does not usually need to be overridden.
    'ttl' => 3600, // Allows you to set the time to live when using APCu. Value is in seconds.
    'stopIfNotFound' => true // Setting this to true will cause AntLoader to stop looking for a class if it is not found in the classmap. By default it will look in the search directories you defined with `addNamespace`.
];
$loader = new AntCMS\AntLoader($config);

New Features

Enhancements

  • You can now set stopIfNotFound to true if you want AntLoader to stop looking for classes if they aren't found using the classmap.

Changes

  • Simply passing an empty path to AntLoader will not longer prevent it from using the system file path to cache the classmap. AntLoader will now simply create a unique key and store it in the system's temporary directory. This file will be persistent and re-used until the OS's garbage collection deletes it or you call resetClassMap.
    • To explicitly turn off the classmap functionality, set mode to none

Version 1.0.2

09 May 05:36
9f34f0f
Compare
Choose a tag to compare

Bug Fixes

  • Fixes a bug / oversight that prevented from you from defining multiple paths for the same prefix / namespace.

Enhancements

  • Minor optimizations to to help minimize the number of checks the autoloader performs.

Changes

  • Improvements to the readme.
  • Written tests that show the classmap offers as high as a 90% decrease in time to instance 1000 classes!

Version 1.0.1

05 May 21:05
Compare
Choose a tag to compare

Changes

  • Improve the PHPDocs

Bug Fixes

  • Fixed a minor bug where AntLoader could write a modified version of a class name to the classmap when using a PSR-0 autoloader.

Initial Release

05 May 02:29
Compare
Choose a tag to compare

This is the initial release of AntLoader