Use prefix in Logger abstract factory #4254

Merged
merged 3 commits into from Apr 30, 2013

Conversation

Projects
None yet
3 participants
Owner

weierophinney commented Apr 17, 2013

Force service prefix in LoggerAbstractServiceFactory

  • To prevent collisions with other abstract factories, the logger
    abstract factory should require that, when requesting a service, the
    service name be prefixed. I chose "Logger", as that's the service type
    being requested.
  • This complements the approach in zendframework/zf2#4253 for cache
    objects.
  • Not a BC break, as the LoggerAbstractServiceFactory has not yet been
    released.
tests/ZendTest/Cache/Service/StorageCacheAbstractFactoryTest.php
+ * @category Zend
+ * @package Zend_Cache
+ * @subpackage UnitTests
+ * @group Zend_Cache
tests/ZendTest/Cache/Service/StorageCacheAbstractFactoryTest.php
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ * @package Zend_Cache

weierophinney added some commits Apr 17, 2013

Created abstract factory for caches
- Allows having multiple cache objects by implementing an abstract
  factory.
- When requesting a cache services, prefix with 'Cache\\', but
  configuration omits that prefix for brevity.
Force service prefix in LoggerAbstractServiceFactory
- To prevent collisions with other abstract factories, the logger
  abstract factory should require that, when requesting a service, the
  service name be prefixed. I chose "Logger", as that's the service type
  being requested.
- This complements the approach in zendframework/zendframework#4253 for cache
  objects.
- Not a BC break, as the LoggerAbstractServiceFactory has not yet been
  released.

mwillbanks added a commit that referenced this pull request Apr 30, 2013

Resolved conflicts, ran php-cs-fixer
Created abstract factory for caches …
- Allows having multiple cache objects by implementing an abstract
  factory.
- When requesting a cache services, prefix with 'Cache\', but
  configuration omits that prefix for brevity.

Force service prefix in LoggerAbstractServiceFactory …
- To prevent collisions with other abstract factories, the logger
  abstract factory should require that, when requesting a service, the
  service name be prefixed. I chose Logger, as that's the service type
  being requested.
- This complements the approach in zendframework/zendframework#4253 for cache
  objects.
- Not a BC break, as the LoggerAbstractServiceFactory has not yet been
  released.

[#4254] Remove unneeded annotations …
- per @samsonasik

mwillbanks added a commit that referenced this pull request Apr 30, 2013

@mwillbanks mwillbanks merged commit 5230a7a into zendframework:develop Apr 30, 2013

1 check failed

default The Travis build failed
Details

gianarb pushed a commit to zendframework/zend-log that referenced this pull request May 15, 2015

Resolved conflicts, ran php-cs-fixer
Created abstract factory for caches …
- Allows having multiple cache objects by implementing an abstract
  factory.
- When requesting a cache services, prefix with 'Cache\', but
  configuration omits that prefix for brevity.

Force service prefix in LoggerAbstractServiceFactory …
- To prevent collisions with other abstract factories, the logger
  abstract factory should require that, when requesting a service, the
  service name be prefixed. I chose Logger, as that's the service type
  being requested.
- This complements the approach in zendframework/zf2zendframework/zf2#4253 for cache
  objects.
- Not a BC break, as the LoggerAbstractServiceFactory has not yet been
  released.

[zendframework/zendframework#4254] Remove unneeded annotations …
- per @samsonasik

gianarb pushed a commit to zendframework/zend-log that referenced this pull request May 15, 2015

weierophinney added a commit to zendframework/zend-cache that referenced this pull request May 15, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment