Re: [REVIEW] PSR-16 Simple Cache

2016-11-16 Thread Larry Garfield
The reasoning here for PSR-6 was that a broken cache should not result 
in a broken program.  If your cache is b0rked, then everything becomes a 
cache miss but the app continues to run, just slowly.  (Maybe unbearably 
slowly, but technically still runs.)  If a failed set threw an exception 
then your cache server hiccuping would crash your whole application, 
which is doubleplusungood.


I believe the same logic applies equally well to PSR-16.

--Larry Garfield

On 11/16/2016 11:19 AM, Jordi Boggiano wrote:

This was also carried over from PSR-6 where Pool::save() returns bool.

I am not really sure what's best here, I expect most implementation 
will throw anyway if they can't connect to the cache, and in other 
instances there is no reason a write should fail AFAIK.


Any other opinions on this?

On 16/11/2016 17:08, Andrew Carter wrote:

Sorry for the double post, what's the reasoning behind returning a
boolean if the set() operation fails? I'd naturally expect that to be an
exception (it's not the same as a cache miss, there must have been some
error).

On Wednesday, November 16, 2016 at 2:22:20 PM UTC, Jordi Boggiano wrote:

Heya,

We believe PSR-16, Simple Cache, is now ready for final review. As
coordinator, I hereby open the mandatory review period prior to a
formal
acceptance vote; voting will begin no earlier than December 1st, 
2016.


Here are links to the most current version and its meta document:

https://github.com/php-fig/fig-standards/blob/1cf169c66747640c6bc7fb5097d84fbafcd00a0c/proposed/simplecache.md



https://github.com/php-fig/fig-standards/blob/1cf169c66747640c6bc7fb5097d84fbafcd00a0c/proposed/simplecache-meta.md




The package containing the interfaces is there:

https://github.com/php-fig/simplecache



The latest important changes to the interfaces can be found at:

https://github.com/php-fig/simplecache/releases/tag/0.2.0



And FWIW, Scrapbook already provides a PSR-16 implementation in its
upcoming release:
https://github.com/matthiasmullie/scrapbook/blob/master/src/Psr16/SimpleCache.php




Thanks for your time reviewing!

Cheers

--
Jordi Boggiano
@seldaek - http://seld.be

--
You received this message because you are subscribed to the Google
Groups "PHP Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to php-fig+unsubscr...@googlegroups.com
.
To post to this group, send email to php-fig@googlegroups.com
.
To view this discussion on the web visit
https://groups.google.com/d/msgid/php-fig/8fb9871d-2e1b-4922-bfc7-b123bec6528f%40googlegroups.com 

. 


For more options, visit https://groups.google.com/d/optout.





--
You received this message because you are subscribed to the Google Groups "PHP 
Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to php-fig+unsubscr...@googlegroups.com.
To post to this group, send email to php-fig@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/php-fig/878ae3be-3d79-9906-6314-f58ec207d158%40garfieldtech.com.
For more options, visit https://groups.google.com/d/optout.


Re: [REVIEW] PSR-16 Simple Cache

2016-11-16 Thread Cees-Jan Kiewiet
This PSR looks splendid, well done. There are how ever a few concerns with
regards to async PHP. I'm aware there isn't a Promise PSR yet but is it
acceptable within this spec to return a promise instead of the actual value
on a get? Or to resolve or reject a promise on set instead of returning
true/false directly.

On Wed, Nov 16, 2016 at 8:04 PM, Stefano Torresi  wrote:

>
> Il giorno mer 16 nov 2016 alle ore 17:19 Jordi Boggiano <
> j.boggi...@seld.be> ha scritto:
>
>> This was also carried over from PSR-6 where Pool::save() returns bool.
>>
>> I am not really sure what's best here, I expect most implementation will
>> throw anyway if they can't connect to the cache, and in other instances
>> there is no reason a write should fail AFAIK.
>>
>> Any other opinions on this?
>>
>
> I don't see any compelling advantage in the boolean return value and I'd
> prefer leaving it out, but there were a few people who argued in favor of
> it during PSR-6 review.
>
> As a side note, out of the most downloaded non-PSR-6 libraries listed in
> the first pages of Packagist, Zend\Cache and Doctrine\Cache do follow this
> convention, while almost every other don't.
>
> --
> You received this message because you are subscribed to the Google Groups
> "PHP Framework Interoperability Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to php-fig+unsubscr...@googlegroups.com.
> To post to this group, send email to php-fig@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/php-fig/CAFojS1sV1YTy5A-rjqq5syGPMbVAcBn1WA-
> D62BDsgV0yVp3wg%40mail.gmail.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "PHP 
Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to php-fig+unsubscr...@googlegroups.com.
To post to this group, send email to php-fig@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/php-fig/CAPY1sU8tU7VrWvuSMjxMwd5qMvDfQbgmc0E_P2dowJMoHt%3D%2BDQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [REVIEW] PSR-16 Simple Cache

2016-11-16 Thread Stefano Torresi
Il giorno mer 16 nov 2016 alle ore 17:19 Jordi Boggiano 
ha scritto:

> This was also carried over from PSR-6 where Pool::save() returns bool.
>
> I am not really sure what's best here, I expect most implementation will
> throw anyway if they can't connect to the cache, and in other instances
> there is no reason a write should fail AFAIK.
>
> Any other opinions on this?
>

I don't see any compelling advantage in the boolean return value and I'd
prefer leaving it out, but there were a few people who argued in favor of
it during PSR-6 review.

As a side note, out of the most downloaded non-PSR-6 libraries listed in
the first pages of Packagist, Zend\Cache and Doctrine\Cache do follow this
convention, while almost every other don't.

-- 
You received this message because you are subscribed to the Google Groups "PHP 
Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to php-fig+unsubscr...@googlegroups.com.
To post to this group, send email to php-fig@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/php-fig/CAFojS1sV1YTy5A-rjqq5syGPMbVAcBn1WA-D62BDsgV0yVp3wg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [REVIEW] PSR-16 Simple Cache

2016-11-16 Thread Jeroen De Dauw
Hey,

How does this CounterInterface fit into the PSR? It seems a lot more
specific than the cache interface itself. I know a lot of places where I'd
have use for the later but not for the former.

Cheers

--
Jeroen De Dauw | https://entropywins.wtf | https://keybase.io/jeroendedauw
Software craftsmanship advocate | Developer at Wikimedia Germany
~=[,,_,,]:3

-- 
You received this message because you are subscribed to the Google Groups "PHP 
Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to php-fig+unsubscr...@googlegroups.com.
To post to this group, send email to php-fig@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/php-fig/CAMhmagDiF1LYNbRYdkVQA9WmH3AUYE5TArJhhmVpEyU8oNcx9Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [REVIEW] PSR-16 Simple Cache

2016-11-16 Thread Jordi Boggiano

This was also carried over from PSR-6 where Pool::save() returns bool.

I am not really sure what's best here, I expect most implementation will 
throw anyway if they can't connect to the cache, and in other instances 
there is no reason a write should fail AFAIK.


Any other opinions on this?

On 16/11/2016 17:08, Andrew Carter wrote:

Sorry for the double post, what's the reasoning behind returning a
boolean if the set() operation fails? I'd naturally expect that to be an
exception (it's not the same as a cache miss, there must have been some
error).

On Wednesday, November 16, 2016 at 2:22:20 PM UTC, Jordi Boggiano wrote:

Heya,

We believe PSR-16, Simple Cache, is now ready for final review. As
coordinator, I hereby open the mandatory review period prior to a
formal
acceptance vote; voting will begin no earlier than December 1st, 2016.

Here are links to the most current version and its meta document:


https://github.com/php-fig/fig-standards/blob/1cf169c66747640c6bc7fb5097d84fbafcd00a0c/proposed/simplecache.md





https://github.com/php-fig/fig-standards/blob/1cf169c66747640c6bc7fb5097d84fbafcd00a0c/proposed/simplecache-meta.md





The package containing the interfaces is there:

https://github.com/php-fig/simplecache



The latest important changes to the interfaces can be found at:

https://github.com/php-fig/simplecache/releases/tag/0.2.0



And FWIW, Scrapbook already provides a PSR-16 implementation in its
upcoming release:

https://github.com/matthiasmullie/scrapbook/blob/master/src/Psr16/SimpleCache.php





Thanks for your time reviewing!

Cheers

--
Jordi Boggiano
@seldaek - http://seld.be

--
You received this message because you are subscribed to the Google
Groups "PHP Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to php-fig+unsubscr...@googlegroups.com
.
To post to this group, send email to php-fig@googlegroups.com
.
To view this discussion on the web visit
https://groups.google.com/d/msgid/php-fig/8fb9871d-2e1b-4922-bfc7-b123bec6528f%40googlegroups.com
.
For more options, visit https://groups.google.com/d/optout.



--
Jordi Boggiano
@seldaek - http://seld.be

--
You received this message because you are subscribed to the Google Groups "PHP 
Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to php-fig+unsubscr...@googlegroups.com.
To post to this group, send email to php-fig@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/php-fig/a847651a-5d4f-5b9a-4ea8-25db4796fa18%40seld.be.
For more options, visit https://groups.google.com/d/optout.


Re: [REVIEW] PSR-16 Simple Cache

2016-11-16 Thread Andrew Carter
Good work.

One thing that always bothered me from a user perspective was not being 
able to put an item in the cache that doesn't expire (different from a 
default expiration time). Having to create times really far in advance is 
messy, and you never know if you're going to run into 2038 bugs etc. It's 
also quite common to have an entry that you don't want to expire, because 
you'll invalidate it yourself or wait for the cache to drop it when it's 
full.

For me, saying that a NULL ttl means some default value somewhere is a 
waste of a feature. If I wanted a default value, my code can (and should) 
explicitly take care of that. I think documenting NULL to mean "This item 
doesn't expire. If the cache driver doesn't not support items that do not 
expire, the ttl will be set to the maximum possible."

Cheers,

Andrew

On Wednesday, November 16, 2016 at 2:22:20 PM UTC, Jordi Boggiano wrote:
>
> Heya, 
>
> We believe PSR-16, Simple Cache, is now ready for final review. As 
> coordinator, I hereby open the mandatory review period prior to a formal 
> acceptance vote; voting will begin no earlier than December 1st, 2016. 
>
> Here are links to the most current version and its meta document: 
>
>
> https://github.com/php-fig/fig-standards/blob/1cf169c66747640c6bc7fb5097d84fbafcd00a0c/proposed/simplecache.md
>  
>
>
> https://github.com/php-fig/fig-standards/blob/1cf169c66747640c6bc7fb5097d84fbafcd00a0c/proposed/simplecache-meta.md
>  
>
>
> The package containing the interfaces is there: 
>
> https://github.com/php-fig/simplecache 
>
>
> The latest important changes to the interfaces can be found at: 
>
> https://github.com/php-fig/simplecache/releases/tag/0.2.0 
>
>
> And FWIW, Scrapbook already provides a PSR-16 implementation in its 
> upcoming release: 
>
> https://github.com/matthiasmullie/scrapbook/blob/master/src/Psr16/SimpleCache.php
>  
>
>
> Thanks for your time reviewing! 
>
> Cheers 
>
> -- 
> Jordi Boggiano 
> @seldaek - http://seld.be 
>

-- 
You received this message because you are subscribed to the Google Groups "PHP 
Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to php-fig+unsubscr...@googlegroups.com.
To post to this group, send email to php-fig@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/php-fig/2dadde75-0559-4a64-a77d-e13bbe1e5690%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [REVIEW] PSR-16 Simple Cache

2016-11-16 Thread 'Alexander Makarov' via PHP Framework Interoperability Group
Looks excellent.

On Wednesday, November 16, 2016 at 5:22:20 PM UTC+3, Jordi Boggiano wrote:
>
> Heya, 
>
> We believe PSR-16, Simple Cache, is now ready for final review. As 
> coordinator, I hereby open the mandatory review period prior to a formal 
> acceptance vote; voting will begin no earlier than December 1st, 2016. 
>
> Here are links to the most current version and its meta document: 
>
>
> https://github.com/php-fig/fig-standards/blob/1cf169c66747640c6bc7fb5097d84fbafcd00a0c/proposed/simplecache.md
>  
>
>
> https://github.com/php-fig/fig-standards/blob/1cf169c66747640c6bc7fb5097d84fbafcd00a0c/proposed/simplecache-meta.md
>  
>
>
> The package containing the interfaces is there: 
>
> https://github.com/php-fig/simplecache 
>
>
> The latest important changes to the interfaces can be found at: 
>
> https://github.com/php-fig/simplecache/releases/tag/0.2.0 
>
>
> And FWIW, Scrapbook already provides a PSR-16 implementation in its 
> upcoming release: 
>
> https://github.com/matthiasmullie/scrapbook/blob/master/src/Psr16/SimpleCache.php
>  
>
>
> Thanks for your time reviewing! 
>
> Cheers 
>
> -- 
> Jordi Boggiano 
> @seldaek - http://seld.be 
>

-- 
You received this message because you are subscribed to the Google Groups "PHP 
Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to php-fig+unsubscr...@googlegroups.com.
To post to this group, send email to php-fig@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/php-fig/c29780ce-0ece-4bbf-9b21-2d7c9eef0d9a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[REVIEW] PSR-16 Simple Cache

2016-11-16 Thread Jordi Boggiano

Heya,

We believe PSR-16, Simple Cache, is now ready for final review. As
coordinator, I hereby open the mandatory review period prior to a formal
acceptance vote; voting will begin no earlier than December 1st, 2016.

Here are links to the most current version and its meta document:

https://github.com/php-fig/fig-standards/blob/1cf169c66747640c6bc7fb5097d84fbafcd00a0c/proposed/simplecache.md

https://github.com/php-fig/fig-standards/blob/1cf169c66747640c6bc7fb5097d84fbafcd00a0c/proposed/simplecache-meta.md


The package containing the interfaces is there:

https://github.com/php-fig/simplecache


The latest important changes to the interfaces can be found at:

https://github.com/php-fig/simplecache/releases/tag/0.2.0


And FWIW, Scrapbook already provides a PSR-16 implementation in its 
upcoming release: 
https://github.com/matthiasmullie/scrapbook/blob/master/src/Psr16/SimpleCache.php



Thanks for your time reviewing!

Cheers

--
Jordi Boggiano
@seldaek - http://seld.be

--
You received this message because you are subscribed to the Google Groups "PHP 
Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to php-fig+unsubscr...@googlegroups.com.
To post to this group, send email to php-fig@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/php-fig/c0e7d147-e0b2-406f-d750-1a52120b0b59%40seld.be.
For more options, visit https://groups.google.com/d/optout.


Re: [PSR-11] Characters allowed in service IDs

2016-11-16 Thread GeeH
After discussion with Larry last night I suggested an edit that states that 
all containers should support a valid PHP string in UTF-8 format. I made 
that suggestion on the pull request.

G

On Tuesday, 15 November 2016 05:42:42 UTC-5, Alessandro Pellizzari wrote:
>
> On 14/11/2016 17:50, David NĂ©grier wrote: 
>
> >> Implementing libraries MUST support identifiers consisting of the 
> > characters A-Z, a-z, 0-9, _, and . in any order in UTF-8 encoding and a 
> > length of up to 64 characters. 
> > 
> > If I read this sentence correctly, this means that one should be able to 
> > *set* in a container any possible identifier from the proposed set of 
> > characters. 
>
> Before replying, I'd like to say that I agree that containers should 
> allow any UTF8 character in keys, of any length. 
>
> I simply see no reason to limit them. 
>
> If a container uses MongoDB (which doesn't allow `.`) as a backend, for 
> example, it will be the container's responsibility to encode/decode the 
> keys. 
>
> > Of course, since this container only exposes environment variables, and 
> > since environment variables cannot contain ".", it does not fulfill the 
> > criteria to be an eligible PSR-11 container (which makes me sad because 
> > in my opinion, this is a legit use case). 
>
> It's the opposite, IMHO. The container supports them (there is no `if` 
> that checks that). If you decide to put only ASCII keys in there it's 
> not the container's fault, so it's PSR-11 compatible. 
>
> Or maybe I misunderstood your sentence. :) 
>
> Bye. 
>

-- 
You received this message because you are subscribed to the Google Groups "PHP 
Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to php-fig+unsubscr...@googlegroups.com.
To post to this group, send email to php-fig@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/php-fig/112c927a-e404-4e3a-8e1f-2740fd71c4a2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.