Goaop Framework Versions Save

:gem: Go! AOP PHP - modern aspect-oriented framework for the new level of software development

1.2.0

7 years ago

Version 1.2.0 is a minor release with one new feature and several fixes:

  • Add an ability to update invocation arguments in advices, see #297
  • Restrict the 1.x branch only to the PHP5.5, because andrewsville/php-token-reflection can work only with PHP=<5.5 and is not maintained anymore, see #305
  • Fix broken logic of pattern matching for includePath and excludePath options, see #300, #311

Please, note, that the branch 1.x will not receive any new features and you should plan your time to upgrade to the 2.x versions.

2.0.0

8 years ago

Here it is! Shiny 2.0.0 version!

This version contains a lot of fixes and improvements:

  • Added a support for the PHP5.6 and 7.0 features: variadic arguments for methods, scalar type hints, return type hints
  • Migrated from the Andrewswille/Token-Reflection to the goaop/parser-reflection library for PHP5.6 and PHP7.0 support
  • Command-line tools for debugging aspects and advisors
  • Dropped support for PHP<5.6, cleaned all old code
  • [BC BREAK] Removed ability to rebind closures because of PHP restrictions, see #247
  • [BC BREAK] Removed getDefaultFeatures() method from the AspectKernel, no need in it since PHP5.6

Changes from the 1.x branch:

  • Fixed cache files permission, now all cache files will be created with given cache mode, resolves #275
  • Added context-sensitive matching that allows new checks #274 and resolves #272 by providing a new pointcut expression !matchInherited() to exclude all inherited methods from matching
  • Fixed logic for complex pointcut expressions, combined with OR logic, resolves #217
  • Fixed broken property interception generated source code for the constructor, resolves #271
  • Property interceptor now use trait for common logic as well returns values by reference, see #54 and #232

Pay attention, that some internal parts are changed, so be careful when updated. Also property interceptors logic is changed now and to modify values in advices, you should use returning by reference methods like following:

    /**
     * Advice that controls an access to the properties
     *
     * @param FieldAccess $fieldAccess Joinpoint
     *
     * @Around("access(public|protected Demo\Example\PropertyDemo->*)")
     * @return mixed
     */
    public function aroundFieldAccess(FieldAccess $fieldAccess)
    {
        $isRead = $fieldAccess->getAccessType() == FieldAccess::READ;
        // proceed all internal advices
        $fieldAccess->proceed();

        if ($isRead) {
            // if you want to change original property value, then return it by reference
            $value = /* & */$fieldAccess->getValue();
        } else {
            // if you want to change value to set, then return it by reference
            $value = /* & */$fieldAccess->getValueToSet();
        }

        echo $fieldAccess, ", value: ", json_encode($value), PHP_EOL;
    }

1.1.0

8 years ago

This version contains several important fixes and improvements:

  • Fixed cache files permission, now all cache files will be created with given cache mode, resolves #275
  • Added context-sensitive matching that allows new checks #274 and resolves #272 by providing a new pointcut expression !matchInherited() to exclude all inherited methods from matching
  • Fixed logic for complex pointcut expressions, combined with OR logic, resolves #217
  • Fixed broken property interception generated source code for the constructor, resolves #271
  • Property interceptor now use trait for common logic as well returns values by reference, see #54 and #232

Pay attention, that some internal parts are changed, so be careful, when updated. Also property interceptors logic is changed now and to modify values in advices, you should use returning by reference methods like following:

    /**
     * Advice that controls an access to the properties
     *
     * @param FieldAccess $fieldAccess Joinpoint
     *
     * @Around("access(public|protected Demo\Example\PropertyDemo->*)")
     * @return mixed
     */
    public function aroundFieldAccess(FieldAccess $fieldAccess)
    {
        $isRead = $fieldAccess->getAccessType() == FieldAccess::READ;
        // proceed all internal advices
        $fieldAccess->proceed();

        if ($isRead) {
            // if you want to change original property value, then return it by reference
            $value = /* & */$fieldAccess->getValue();
        } else {
            // if you want to change value to set, then return it by reference
            $value = /* & */$fieldAccess->getValueToSet();
        }

        echo $fieldAccess, ", value: ", json_encode($value), PHP_EOL;
    }

1.0.2

8 years ago

Patch release fox fixing the issue #259, which dramatically reduce the performance of the framework.

1.0.0

8 years ago

1.0.0 (Feb 13, 2016)

  • Dropped support for PHP<5.5, clean all old code
  • Tagged public methods and interfaces with @api tag. No more changes for them in future.
  • Refactored core code to use general interceptors for everything instead of separate classes
  • New static initialization pointcut to intercept the moment of class loading
  • New feature to intercept object initializations, requires INTERCEPT_INITIALIZATIONS to be enabled
  • [BC BREAK] remove class() pointcut from the grammar #189
  • [BC BREAK] make within() and @within() match all joinpoints #189
  • [BC BREAK] drop @annotation syntax. Add @execution pointcut
  • Pointcuts can be build now directly from closures via PointcutBuilder class
  • Do not create files in the cache, if no aspects were applied to them, respects includePath option now
  • FilterInjector is now disabled by default, this job for composer integration now
  • Automatic opcache invalidation for cache state file

0.6.1

8 years ago

Minor patch to fix a bug with overwriting of original files

0.6.0

9 years ago

Version 0.6.0 is ready! This is probably the last 0.x release and now we are going to 1.0.0.

However, this version also includes some improvements and changes:

  • Interceptor for magic methods via "dynamic" pointcut. This feature also gives an access for dynamic pointcuts with different checks and conditions.
  • PSR-4 standard for the codebase, thanks to @cordoval
  • Added a support for splat (...) operator for more efficient advice invocation (requires PHP5.6)
  • New feature system. All tunings of kernel are configured with feature-set. This breaks old configuration option interceptFunctions=>true use 'features' => $defaultFeatures | Features::INTERCEPT_FUNCTIONS now
  • Proxy can generate more effective invocation call with static::class for PHP>=5.5
  • Bug-fixes with empty cache path and PSR4 code, thanks to @andy-shea

0.5.0

10 years ago

Version 0.5.0 of framework is ready!

  • Proxies are now stored in the separate files to allow more transparent debugging
  • Cache warmer command added
  • Extended pointcut syntax for or-ed methods: ClassName->method1|method2(*)
  • Access to the annotations from MethodInvocation instance
  • Support for read-only file systems (phar, GAE, etc)
  • Direct access to advisors (no more serialize/unserialize)
  • New @within pointcut to match classes by annotation class
  • Nice demo GUI
  • Deprecate the usage of submodules for framework
  • Inheritance support during class-loading and weaving
  • List of small fixes and imrovements

0.4.3

10 years ago
  1. Add minor changes for supporting CLI-mode
  2. Optimization: sort list of advices only during the cache creation phase
  3. Optimization: do not split a source into array of lines if there is only one class per file

0.4.2

10 years ago
  1. Switched to doctrine/annotations package instead of doctrine/common
  2. Removed the Demo namespace from the composer and use it only for testing.
  3. Optimized injection of advices and caching of callables
  4. Some fixes for supporting Symfony2 and SensioDistributionBundle