by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 24 12:50
    kakenbok commented #736
  • Sep 24 12:22
    mnapoli closed #735
  • Sep 24 12:22
    mnapoli commented #735
  • Sep 24 12:22

    mnapoli on 6.2.3

    (compare)

  • Sep 24 12:21

    mnapoli on master

    Silenced Error Removing tmp. Co… Merge pull request #736 from ka… (compare)

  • Sep 24 12:21
    mnapoli closed #736
  • Sep 24 12:21
    mnapoli commented #736
  • Sep 24 12:21
    mnapoli labeled #736
  • Sep 24 12:20
    mnapoli labeled #735
  • Sep 24 11:59
    kakenbok commented #736
  • Sep 24 11:54
    kakenbok opened #736
  • Sep 24 11:53
    kakenbok closed #694
  • Sep 24 11:53
    kakenbok synchronize #694
  • Sep 24 11:48
    kakenbok synchronize #694
  • Sep 24 11:19
    kakenbok opened #735
  • Sep 23 13:45
    BinZhiZhu closed #732
  • Sep 23 03:13
    il-m-yamagishi starred PHP-DI/PHP-DI
  • Sep 20 02:40
    Lohn starred PHP-DI/PhpDocReader
  • Sep 20 02:40
    Lohn starred PHP-DI/PHP-DI
  • Sep 20 02:40
    Lohn starred PHP-DI/Invoker
jlherren
@jlherren
Welp, I managed to do it by creating my own DefinitionSource that throws an exception and adding it as first source. I'm no so thrilled, the whitelist turns out to be much larger than I anticipated, which makes it a bit annoying. Each and every controller, manager, whatever needs to be added there...
Marcus Pettersen Irgens
@marcusirgens
Hi! I’m trying to automatically add a logger on classes that implement LoggerAwareInterface, but so far I’ve not been successful. Anyone got any pointers?
Raymond
@vitameen_twitter
Hi, I'm trying to use a php-di call on a method which have a default parameter but i get this error Fatal error: Uncaught Invoker\Exception\NotEnoughParametersException: Unable to invoke the callable because no value was given for parameter 1
Raymond
@vitameen_twitter
Hi, I'm trying to use a PHP-DI Call on a method which have a default parameter but i get this error
PS: PHP-DI 6
Fatal error: Uncaught Invoker\Exception\NotEnoughParametersException: Unable to invoke the callable because no value was given for parameter 1...
  Classe Bill
  {

  public function index($slug=null,Request $request){
            //----
       }
  }

use DI\ContainerBuilder;

$containerBuilder = new ContainerBuilder;
$container = $containerBuilder->build();

$controller = 'Bill' ;
$method = 'index';
$parameters = []; 
$response = $container->call([$controller,$method], $parameters);
Mandeep Sharma
@mandeephub
hello to all
<?php
        $tourQuery = mysqli_query($con,"SELECT to_startdate,to_enddate FROM tour WHERE  to_name !='' AND to_startdate !='0000-00-00' AND to_deactivated !=1 GROUP BY MONTH(to_startdate),YEAR(to_startdate) ORDER BY to_startdate");

        while ($tourGroup = mysqli_fetch_assoc($tourQuery)){
                 $Date = $tourGroup['to_startdate'];

            $query = "SELECT to_id,to_startdate,to_enddate,price,to_name,child_cat FROM tour WHERE to_name !='' AND to_startdate !='0000-00-00' AND suid = 2 AND to_deactivated !=1 AND ( YEAR(to_startdate)+'-'+ MONTH(to_startdate) = YEAR('".$Date."')+'-'+ MONTH('".$Date."') ) ORDER BY to_startdate";

            $Query = mysqli_query($con, $query);
            if(mysqli_num_rows($Query) > 0) {
                ?>
Whats wrong with this php code its working on localhost but not on live server
$tourQuery returns true on localhost but false on live server ??????
Chris Gilroy
@ChrisGilroy9_twitter
Hi all. I'm trying to grasp how to use PHP-DI, and apparently I'm not really getting it. I have the container built. I have a definition added, a DatabaseConnection::class. I can successfully grab the connection via $db = $container->get(DatabaseConnection::class), but I'm trying to understand autowiring now. If I place $test = new TestClass(); after the container is built, and inside of TestClass, I have a dependance of DatabaseConnection in it's __constructor, I thought it would inject that into the TestClass and away I go.
Apparently, that's either not how things work, or I'm doing something wrong somewhere but I can't figure out where I'm going wrong.
Birzenbae
@Birzenbae
@mandeephub Hey, my best guess is that either the mysql-version or at least the "sql_mode" setting differ. The problem is that in new versions of mysql the column selection needs to be the same as in your group by clause except if you use aggregation operates like MAX Min etc.
Mandeep Sharma
@mandeephub
@Birzenbae thanks for pointing out that issue i have informed the hosting company to reduce my sql version from 5.7 to 5.6 hope it works
Mandeep Sharma
@mandeephub
"SELECT to_startdate, to_enddate FROM tour WHERE to_name !='' AND to_startdate !='0000-00-00' AND to_deactivated !=1 GROUP BY MONTH(to_startdate), YEAR(to_startdate) ORDER BY to_startdate"
this query is not waorking in sql 5.6 and working in 5.6 how to convert 5.6 query to 5.7
Birzenbae
@Birzenbae
@mandeephub Have a look at this two links :https://dev.mysql.com/doc/refman/5.7/en/group-by-handling.html
smdevdk
@smdevdk
Should the default behaviour not be to re-init classes every time they are requested in a constructor? Instead of treating every single class as a shared resources across the entire app.
Mandeep Sharma
@mandeephub
Oops php is hard
Maciej Holyszko
@falkenhawk
hi @mnapoli , I am returning to you with some of my suggestions for php-di improvements (as promised more than 1.5 year ago...) I am sorry it's taking that long from my side - I hardly worked on php projects recently (moved to js)
please take a brief look at https://github.com/ovos/PHP-DI/pulls when you have time. Feature/service locator still needs some polishing, so that its point would be somehow proven, and a test suite. I won't push with PRs if you decide it does not make sense though.
ashick1234
@ashick1234
fgyhtyutrggyhgefhuefheuhehghtrfyjutrfjutr
yyutrutryuhtruhtrhtrghtrghtyghtyhtrguitrguiujhfggherhtgghghhgghygyuyhujsdfgyasfgndcxtnfsdbtf6edetf68erwGHESDFSDF
FDSFSDFSDFSD
DSF
SF
H
K
JU
K
JH
JH
H
N
NH
H
NH
HNH
GH
H
GH
GH
GHGH
GH
GJ
GHGGH
TYSEZSDEGHHHHVRFYNHR
DFRDFGN
TRGNM
GHNNHEGHGHRG
seugenev
@seugenev

as i understood definitions are instructions on how classes should be instantiated once requested
im trying to create a definition for the class to call some method which will receive container itself

twig works good by my Model class doesnt. what is wrong ?


use Twig\Environment;
use Core\Model;
use Psr\Container\ContainerInterface;

return [
    Environment::class => function () {
        $loader = new \Twig\Loader\FilesystemLoader(__DIR__ . '/../App/Views');
        return new \Twig\Environment($loader);
    },
    Model::class => function (ContainerInterface $container){
        $model = new Model();
        $model->setContainer($container)->getConnection();
        return $model;
    }
];