Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • May 12 18:46
    dracony commented #6
  • May 12 18:43

    dracony on 3.7.2

    (compare)

  • May 12 18:43
    dracony commented #6
  • May 12 18:42

    dracony on master

    Updated composer.json to get de… Swithced to dorantor branch for… Fixed curly braces access error… and 2 more (compare)

  • May 12 18:42
    dracony closed #6
  • May 12 12:26
    dorantor opened #6
  • Oct 19 2020 03:15
    garrettw commented #50
  • Oct 17 2020 09:07
    technicalreju opened #50
  • Oct 02 2020 01:39
    iamnishan opened #49
  • Oct 01 2020 17:41
    Aakash225 closed #47
  • Oct 01 2020 17:34
    garrettw commented #47
  • Oct 01 2020 16:12
    mjrider commented #48
  • Oct 01 2020 11:14
    tunggnu commented #48
  • Oct 01 2020 09:17
    Khushboo-Bhatia opened #48
  • Sep 30 2020 18:46
    Aakash225 opened #47
  • Aug 19 2020 07:19
    DavidGitonga opened #4
  • May 31 2020 18:00
    dracony commented #11
  • May 31 2020 18:00

    dracony on 3.8

    (compare)

  • May 31 2020 18:00

    dracony on master

    social provider VK api fix ver… VK, users.get backwards compati… Merge pull request #11 from kip… (compare)

  • May 31 2020 18:00
    dracony closed #11
Bloodoff
@Bloodoff
thnx
$missingKeys = array_intersect($required, $keys);
but missing keys are not intersect of arrays required and all keys
Bloodoff
@Bloodoff
How to define ORM Wrappers ? the way described in documentation not working after update
Bloodoff
@Bloodoff
found a way :)
Roman Tsiupa
@dracony
Thanks! Will fix
Tiago
@TiagoGomesPires
Hello
is someone here?
Bloodoff
@Bloodoff
yes
Hi
Bloodoff
@Bloodoff
@dracony , the certifiacte on site has expired
Anton Kolenkov
@dorantor

Hi All. What is a proper way to work with Response? According to what I see in code it's not what promised in docs. For example, this will not work:

$response->headers->set('Content-Type', 'text/csv');
// ->headers are protected property
// ->set() there is no such method

If you have created response with

$response = $responses->string('hello world');

You also cannot set headers.

Currently I'm accumulating headers separately and building response object right at the end of processor action logic, just before return. But that's feels lame. Am I missing something?

Roman Tsiupa
@dracony
set() is public
and responses get the editable version, here:
Anton Kolenkov
@dorantor

A-ha. This is the part I've missed, thanks.
And what about body? Is it proper way?

// inside Processor action method
$this->response = $this->responses()->string('');
//...
$this->response->body()->write($someString);

What would be proper way and moment to create response within React like environment? Should it be within __constructor() or inside process() where I already catch and save Request for further processing. Or, maybe, there is a better way to access current Request object inside action method?

Roman Tsiupa
@dracony
Why do you need to write() after building the string response? If its to stream data incrementally there are better reponse types in the Responses class
I think the best would be to create the Reaponse as late as possible just before returning vs mutating it
But its just preference. There is nothing special about the response class itself really. I would definitely create it in process() then in constructor. Constructor to me seems to be just for wiring things and technically a single processor can serve multiple requests in sequential calls to process()
Anton Kolenkov
@dorantor

Why do you need to write() after building the string response? If its to stream data incrementally there are better reponse types in the Responses class

Because I need response to attach headers first. And, at the last moment, when everything else is in place(within Response object) I'm adding last piece - body. In my flow, headers and body are set separately in different places.

I think the best would be to create the Reaponse as late as possible just before returning vs mutating it

This is what I do now - collect headers in array and create Response just before Action return. But it feels slightly wrong - instead of single object responsible for response I have few.

But its just preference. There is nothing special about the response class itself really. I would definitely create it in process() then in constructor. Constructor to me seems to be just for wiring things and technically a single processor can serve multiple requests in sequential calls to process()

Good point, actually. Especially according to my context, where I'm trying to run application inside RoadRunner(React-like environment). So it's not just preference.

Linh-Tran-0312
@Linh-Tran-0312
Hi Dracony, Could you help me with a problem, I had created phpixie bunlde as your guideline in youtube but when I access http:localhost in my browser there is no message displayed
Linh-Tran-0312
@Linh-Tran-0312
I get stuck at "If everything went smooth upon visitng http://localhost/ you should see a greeting. Also test that URL rewriting works properly by checking http://localhost/greet, you should see the same exact page."
Roman Tsiupa
@dracony
Can you send me a zip of the project, I'll take a look locally, that would be the fastest
@Linh-Tran-0312
If you are looking for an example of a bundle the https://github.com/phpixie/framework-bundle is itself a bundle so you can use it as example
Roman Tsiupa
@dracony
Linh-Tran-0312
@Linh-Tran-0312
thanks Dracony, I've fixed this problem. My problem is similar to Philip above, need to change the basePath
Roman Tsiupa
@dracony
Great!
Linh-Tran-0312
@Linh-Tran-0312
Hi Dracony, I have another problem when connect database. Error is " SQLSTATE[HY000] [2054] Server sent charset unknown to the client. Please, report to the developers", the reason is that default charset of mySpl server (version of 8.xx) is utf8mb4, I have changed the Server connection collation: to utf8 but It doesn't work, can you help me ?
Roman Tsiupa
@dracony
@Linh-Tran-0312 you can specify it as connection parameter id database config
return array(
    //You can define multiple connections
    //each with a different name
    'default' => array(
        'driver'     => 'pdo',

        //MySQL
        'connection' => 'mysql:host=localhost;dbname=phpixie;charset=utf8mb4',

        'user'       => 'root',
        'password'   => 'password'
    ));
Bloodoff
@Bloodoff
Hi, the certificate on official site is expited. Please renew
saba sedigh
@saba.sedigh_gitlab
hello. I am looking at getting started page. I reads as follow "we just need to create the app:messages template that the processor uses, that’s the easiest part:"
What is the file it is talking about? Where is it?
thanks
Roman Tsiupa
@dracony
@saba.sedigh_gitlab /bundles/app/assets/templates/messages.php
It's mentioned later on the page
saba sedigh
@saba.sedigh_gitlab
I did search all the files and find that out.
put after that laft part (of the part one); going to the localhost/ will show the same PHPIXIE welcome page that you get at the begining.
any ideas?
saba sedigh
@saba.sedigh_gitlab
also this:
./console framework:seed
return [
[
'id'     => 1,
'userId' => 1,
'text'   => "Hello World!",
'date'   => '2016-12-01 10:15:00'
],
// ....
][ERROR]: count(): Parameter must be an array or an object that implements Countable
saba sedigh
@saba.sedigh_gitlab
Is there more detailed tut available to read!
saba sedigh
@saba.sedigh_gitlab
also I am testing your given site configuration but I get 403 Forbidden.
/var/log/nginx/nginx_error.log   2021/08/28 18:25:31 [error] 31206#31206: *1 directory index of "/home/admin/habib/project/web/" is forbidden, client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", host: "localhost:870"
removing $uri/ from try_files directive would solve the problem.
Did you made the mistake?
eduardosilva44
@eduardosilva44
Hello!