We are moving our forum in GitHub Discussions. For questions about Phalcon v3/v4 you can visit here and for Phalcon v5 here.

Ideas for plugins

We are working on a big project using phalcon. But we are missing:

So we are planning on building these ourselved. I don't know if there is anyone else who had similar ideas, hence this thread.

Btw can we make a category "plugins" ?


+1 For HTTP (Though Guzzle is pretty good)


@thecodeassassin Take a look at https://php.net/http for an http client


You can use the Http extension: https://www.php.net/manual/en/intro.http.php

We use it in this forum to authenticate users against Github: https://github.com/phalcon/forum/blob/master/app/library/Github/OAuth.php#L57

@thecodeassassin We have talked about integrating a Mail component in Phalcon but opted not to in the end, primarily because a mail component relies heavily on network traffic so if your network is slow, so will the component itself.

We can always work something out in the incubator repo of course.


@Nikolaos Dimopoulos

Do you mean the whole phalcon extension would get slow? Well when we hit something ill update the thread. It's a required functionality for us, so we have to build it anyways.


@Phalcon Making the http plugin is not out of the question for us. the HTTP extension cannot be installed on our current host which rules it out.

@thecodeassassin No I that is not what I meant.

The philosophy behind Phalcon is to create a PHP framework that is fast and can deliver its functionality immediately without any additional file scans, injections of modules etc. It is also designed in such a way whereas its components (well most of them) can be used as glue components i.e. you only use what you need. This way components don't necessarily slow each other down if used properly.

Now a mail component could very well be a good addition to the feature list, but it doesn't offer performance because it doesn't only depend on the hardware Phalcon is installed, it is also dependent on the network traffic.

So if for instance you have Zend Mail and you construct a message, that will be

  1. several file scans and includes
  2. a few lines of code on your part to construct the message
  3. Zend Mail constructing the mail transport class (which could be localhost or other server)
  4. Zend Mail sending the message
  5. Reporting back errors if any

If we had the same component in Phalcon, performance would be increased only in steps 1 and 2. The remaining steps would depend on network traffic, For instance #3, constructing the mail transport class, yes the creation of the class would be fast but if you are connecting to a different SMTP server and you have delays on the network layer, your component, whether it is Zend or Phalcon Mail will perform slowly. Same with #4 and #5.

It all depends on how critical the mail component is to your application. My guess would be that Zend Mail or even Swiftmail would be sufficient providing that your network is top notch :)


@Nikolaos Dimopoulos someone should make a reply option to this forum =).

I want to design the mail component in a fashion that directly integrates with phalcon. Using volt for message templating etc. Creating a easy interface for the developers. Of course i will add this to the incubator if it's done.