by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 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
  • May 19 18:28
    edwinsiebel commented #779
  • May 19 12:16
    jlambe closed #779
  • May 19 12:16
    jlambe commented #779
  • May 19 10:19
    edwinsiebel opened #779
  • May 18 05:20
    tavo1987 commented #774
  • May 17 11:01

    dependabot[bot] on npm_and_yarn

    (compare)

  • May 17 11:01

    jlambe on 2.0

    Bump acorn from 6.4.0 to 6.4.1 … Merge pull request #776 from th… (compare)

  • May 17 11:01
    jlambe closed #776
  • May 15 16:50
    jlambe commented #760
  • May 15 16:44
    jlambe labeled #775
  • May 15 16:44
    jlambe commented #775
  • May 15 16:42
    jlambe commented #777
  • May 15 16:37
    jlambe commented #778
  • May 15 16:35
    jlambe unlabeled #778
Julien Lambé
@jlambe
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?
Julien Lambé
@jlambe
I work on blocks this afternoon regarding a project. I’ll have better insights to share early next week.
Marc Wieland
@marcwieland95
Ok, perfect. Let me know
swaraasolutions
@swaraasolutions
@jlambe couple of issues i found when trying to integrate Themosis 2.0 on windows, linux worked like a charm
  • addLocation function under Finder.php the path is being defined however for windows the path starts with /D: due to this the assets are always not found if we remove the additional / in front of the path it works great
Julien Lambé
@jlambe
@swaraasolutions Thanks for reporting this issue. Can you post it under the framework repository or perhaps could you make a pull request? https://github.com/themosis/framework/issues Thanks
swaraasolutions
@swaraasolutions
@swaraasolutions Thanks for reporting this issue. Can you post it under the framework repository or perhaps could you make a pull request? https://github.com/themosis/framework/issues Thanks
i will generate a pull request first thing monday morning IST
swaraasolutions
@swaraasolutions
@jlambe have added my first pull so let me know if there are any issues
Julien Lambé
@jlambe
@swaraasolutions I’ll checked it. Thanks!
Nicholas Tsim
@ntsim

Hi @jlambe , loving the work on v2! I'm glad that someone is trying to make Wordpress bearable! :smile:

Just wondering what your feelings about where views/assets should go in the project structure. I'm getting the impression that these should generally be going in the project's theme directory, but for my use-case (a single Wordpress app), I can't really think of a compelling reason to do this.

My initial thoughts would be to actually hoist everything to root-level views/assets directories as it seems like it would make working on my project easier, particularly because:

  • Not having to traverse down to the project theme to build assets
  • More Laravel-y project structure
  • Would make use of the root-level views directory (would just be empty otherwise?)

On the other-hand, I'm quite new to Themosis, so I'm not sure if there are potential downsides to this kind of approach?

Julien Lambé
@jlambe
Hi @ntsim, personally I keep my views inside the theme. The idea is to still be able to swap all application output by simply changing the theme. I use root application views for « shared » views or for anything that goes inside the WordPress administration.