Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Martin Olsansky
    @olso
    hey, i used composer to introduce functional-php to my project, however I am getting Functional class not found??
    Lars Strojny
    @lstrojny
    @olso can you show me your usage example?
    Martin Olsansky
    @olso
    use Functional\map as map;
    Class 'Functional' not found
    "lstrojny/functional-php": "~1.2@dev"
    Lars Strojny
    @lstrojny
    Try:
    use function Functional\map;
    Functional\map is a function, not a class
    Martin Olsansky
    @olso
    @lstrojny I see it in the vendor folder
    use function is php56 only
    i see composer min php now
    @lstrojny but its the same with use Functional as F; which should work?
    Lars Strojny
    @lstrojny
    1.0 will work for you then
    There you do this:
    use Functional as F;
    
    F\map([1, 2, 3], function() {});
    Martin Olsansky
    @olso
    @lstrojny 1.2 not using classes anymore?
    Lars Strojny
    @lstrojny
    1.0 didn’t either. use Functional as F just renames the namespace "Functional", not a class
    Martin Olsansky
    @olso
    @lstrojny it works now, it was actually my fault. I used static accessor
    F::map
    thanks
    Aurimas Niekis
    @aurimasniekis
    Hi, one of the best libraries for php... I saw everywhere the use case in my every day coding...
    Lars Strojny
    @lstrojny
    @gcds Thanks! What do you like about it?
    Andrea Passaglia
    @gurghet
    hello every body
    literally
    is there a particular reason why maximum is not an alias for max?
    Lars Strojny
    @lstrojny
    @gurghet yes, unfortunately does the original max() a few things slightly weird. See here for an example: https://3v4l.org/i7LXu
    Andrea Passaglia
    @gurghet
    it changes behavior depending on the version... I see, thanks for the heads up
    Gilles Crettenand
    @krtek4
    Hello there,
    Sorry to barge in like that :P
    I was approached by Packt Publishing to eventually write a book about functional programming in PHP and I was wondering if any of you had any input for the outline of the book (in terms of Topics / Chapters) ?
    Thanks for any input you could give :smile:
    Andrea Passaglia
    @gurghet
    I am also a Packt Publishing author! If you need any help, I am also a heavy functional PHP user.
    Definitely write something about functional PHP and promises
    Andrea Passaglia
    @gurghet
    @krtek4
    Gilles Crettenand
    @krtek4
    Hey Andrea. What did you write about ? I keep your proposition for help in mind, thanks :)
    I didn't put anything in the outline about promises explicitly, and Packt already find there's a bit too much chapters. But I think we can squeeze an example in there making use of them with some backround explanation. Do you have a specific example in mind ?
    Gilles Crettenand
    @krtek4
    @gurghet sorry to ping you ;)
    Gilles Crettenand
    @krtek4
    Hello hello,
    I was wondering what would be your take on creating a GitHub organization to federate some curated repositories revolving around functional programming in PHP. It could be name 'functional-php' and include this library obviously. I am also thinking of contacting the authors of https://github.com/schmittjoh/php-option and https://github.com/jkoudys/immutable.php.
    Would be great to have your opinion on this :)