by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jul 01 12:57

    dependabot[bot] on npm_and_yarn

    (compare)

  • Jul 01 12:57

    jlambe on 2.0

    Bump websocket-extensions from … Merge pull request #781 from th… (compare)

  • Jul 01 12:57
    jlambe closed #781
  • Jun 25 08:20
    jlambe labeled #783
  • Jun 25 08:20
    jlambe opened #783
  • Jun 08 14:26
    calvinseng closed #782
  • Jun 08 14:26
    calvinseng commented #782
  • Jun 08 06:12
    calvinseng opened #782
  • Jun 07 15:05
    dependabot[bot] labeled #781
  • Jun 07 15:05
    dependabot[bot] opened #781
  • Jun 07 15:05

    dependabot[bot] on npm_and_yarn

    Bump websocket-extensions from … (compare)

  • Jun 05 08:56
    ligne13 closed #780
  • Jun 05 08:56
    ligne13 commented #780
  • Jun 05 08:45
    ligne13 opened #780
  • May 29 14:37

    jlambe on 2.0.7

    Update framework version to 2.0… (compare)

  • May 29 14:31

    jlambe on 2.0

    Fix syntax on phpunit test. (compare)

  • May 29 14:19

    jlambe on 2.0

    Fix Mix helper path. Add manife… Update Mix helper test paths. (compare)

  • May 20 10:01
    edwinsiebel commented #779
  • May 20 10:00
    edwinsiebel commented #779
  • May 19 18:59
    jlambe commented #779
David Pache
@Dave3o3
haha :D k, good point
Marc Wieland
@marcwieland95
Would be nice if we could tweak Trellis and also add official support to Themosis. For me this is a big chunk which is missing.
David Pache
@Dave3o3
i would be more interested in an official Docker repo. but creating a Vagrantfile and Ansible script should be not that hard
i think for the start, we could create an Ansible role which can be used for local and production deployments
Marc Wieland
@marcwieland95
So far I have no experience with Docker.
For my next project I will try it
David Pache
@Dave3o3
it’s helpful to keep things apart from each other. so basically i see a setup like:
webserver-container (nginx or apache)
db-container (mariadb)
wordpress-container (themosis)
a big plus is that you can run all three on the same machine or split them apart on 3 cloud server instances. provisioning can be done with ansible too.
@jlambe are there already plans for official provisioning scripts/repos?
Marc Wieland
@marcwieland95
🙏
Julien Lambé
@jlambe
@Dave3o3 At this moment no plans. I’ve personnaly worked with homestead (which is provided now by default on version 2.0) and docker. It’s hard to provide a formula that works for everyone. I’m also a big fan of Ansible and one project that might interest people is Ansistrano: https://ansistrano.com/
Also, for local development, I would love an easy script for using Docker as my hard drive is filled with too much vms :laughing:
David Pache
@Dave3o3
i see :) never heard of ansistrano, thanks!
yeah, i know what you mean
therefore a official docker repo makes sense imho
you can have one vm with all the docker containers you need ;)
Julien Lambé
@jlambe
I’ve started exploring this. There is an official « themosis » repository on docker hub (empty) for later store projects. I would also like to create a docker configuration so developers can easily bootstrap the framework for core development and contribution.
David Pache
@Dave3o3
great to hear that! i’m currently quite busy but i would also like to get my hands on creating Dockerfiles. if i find the time, i could try something to contribute to the project :)
if one would like to create a Dockerfile, which base OS should one use?
Julien Lambé
@jlambe
I love working on Fedora but for general purpose I’ll definitely go with Ubuntu.
David Pache
@Dave3o3
i mean for the container :)
besides that one could use ubuntu as base image ofc
Julien Lambé
@jlambe
it depends on your base image. Will you start based on a php image or a nginx/apache image...
David Pache
@Dave3o3
i would separate the webserver from the application. so i would start with the php7.2-stretch image
Julien Lambé
@jlambe
It’s been sometimes now but perhaps for local development, a good start point would be to generate a docker compose file with everything needed. Last I’ve done this, my only complain is that the requests were very slow on docker for Mac. Nowadays, don’t know if the issues regarding the filesystem layer are fixed.
David Pache
@Dave3o3
maybe quite a overhead, but what about providing a small VM with a Vagrantfile to run docker in? :D
Julien Lambé
@jlambe
Frankly i don’t know, not that much of an expert with docker. The issue is that you have to provision the vm before going further.
David Pache
@Dave3o3
i see a solution like:
Vagrantfile -> (optional: ansible provisioner) -> install docker -> run docker-compose
so in the end you have your local docker-vm setup with vagrant up
and for those who don’t want the VM, they can use the plain docker-compose
Julien Lambé
@jlambe
Sounds like a good compromise. Personnaly I would like to get rid of a the vm. Do you have a testable environment like this ?
David Pache
@Dave3o3
no, i have to set it up. this was just loud thinking :D
but i like to try it
Julien Lambé
@jlambe
:thumbsup: This is not my priority for the moment but if you have something to test someday, I’d love to try :wink:
David Pache
@Dave3o3

short question regarding the needed extensions: the intl extension is already bundled with php, right?

This extension is bundled with PHP as of PHP version 5.3.0. Alternatively, the PECL version of this extension may be used with all PHP versions greater than 5.2.0 (5.2.4+ recommended).

Julien Lambé
@jlambe
It is a native one but not always enabled on compilation. For example, by default on my mac, the extension is missing on default php. You can install it through PECL or if you compile PHP, just add the --enable-intl option.
On a Homestead environment it is enabled and normally most host providers compile it.
David Pache
@Dave3o3
k, thanks
Ghost
@ghost~5b695616d73408ce4fa3c027
@jlambe Thanks for the list of features :)
Ghost
@ghost~5b695616d73408ce4fa3c027
You said there's a new custom fields API based on ReactJs components, could you elaborate?
Julien Lambé
@jlambe
@JaspervanV_gitlab The custom fields interface is built only with javascript. When you define a custom field for a metabox, its UI is handled by a js component built with ReactJs. This is only available when working with metabox and custom fields. Custom fields for settings page or regular forms, are html only.
Ghost
@ghost~5b695616d73408ce4fa3c027
ah okay, thanks
Marc Wieland
@marcwieland95
Has anyone experience with Themosis and Gutenberg? How do you structure the blocks inside the framework? Logic, view, etc.
Julien Lambé
@jlambe
@marcwieland95 I’ve planned to work on blocks this end of the week for a project. Currently there is no recommendation to write blocks but we can surely share our own experience about this and figure out one.
Marc Wieland
@marcwieland95
Sounds good. I'm working on projet right now .
I'm using ACF Blocks for the moment. They provide a callback function for the template. Inside this function I'd like to init a BlockController. At this point I'm failing. I don't get dependency injection to work there
Marc Wieland
@marcwieland95
The question is how do you init a controller class? Inside the router there's a lot of magic behind this CLASS@METHOD syntax I guess. But I can't find code inside the framework.
Julien Lambé
@jlambe
@marcwieland95 Basically controller dependencies are handled automatically wherever you use it. Auto-injection does not work if called from an Action::add method because it’s not handled by the service container, it is handled by call_user_func functions which cannot resolve dependencies. I’ve tried to find a way to make use of the service container for hook classes but without luck.
Marc Wieland
@marcwieland95
Ah okay. Exactly that's what happens inside the ACF callback
Marc Wieland
@marcwieland95

@jlambe When I call something like that:

$controller = new BlockController();
$controller->map($block, $content, $is_preview);

I should be able to resolve models inside the controller, right? public function map(Post $post, $post_new) {
This is not the case. I get an error: Argument 1 passed to Theme\Controllers\BlockController::map() must be an instance of Theme\Models\Post, array given

Julien Lambé
@jlambe
When calling a method directly, you have to pass expected objects. Personnaly I’ve never had to call a controller this way. So if your map method signature is expecting as the first argument a Post model, your $block variable must be an instance of such model. The controller will not try to convert it if this is something you were expected.
Marc Wieland
@marcwieland95
I init the class inside the method now. It doesn't make sense to couple it in this way
Do you already have any further ideas about using blocks inside Themosis?