In com_localise, we use $github = new JGithub($options);
to compare core release language files with a language we translate.
I see that the library is no more in 4.0 and there is a deprecate notice
* @deprecated 4.0 Use the
joomla/githubpackage via Composer instead
That is Tibetan for me. :)
Could someone explain to me what I can do precisely to replace new JGithub()
Labels |
Added:
?
|
Alas, I get
Class 'Joomla\Github\Github' not found
@infograf768 in 4.0 ;)
yes, in 4.0
I suggest to add back the github library into 4.0.
Core doesn't use it (or any of the other social libraries being dropped from the main distribution) and including it in extensions is easy once you grasp the concept of Composer.
I guess my issue is that I do not grasp it at all. ;)
I would need a full tutorial explaining what I should do in the case of com_localise.
My tools are Eclipse (with com_localise as a project in my workspace) and Text editors.
Only 'tuto' available is
https://docs.joomla.org/J3.x:Using_Composer_with_Joomla
Which honestly does not help at all
I always find it strange myself if there is no package to download for a specific library.
I once tried to install composer but didn't get it to work myself. Composer is a great thing for people who use it regulary, but it's a nightmare for people who only do coding occassionally, which there are many in our Joomla sphere.
I'm not sure if it is possible to just download the package from https://github.com/joomla-framework/github-api/releases and include it manually. Maybe a production ready package could be created and put there instead of just the repo-zip there is.
The only dependency I see is the Http package which should be available in Joomla.
Step by step tutorial (when you want i make a youtube video):
Step 1:
Get Composer for Mac OS and install it globally:
https://yvesh.gitbooks.io/mac-os-joomla-development-setup/content/composer.html
Step 2:
Open the Mac OS Terminal:
Type in composer
and make sure you see the help screen.
Step 3:
Navigate to your Joomla 4.x installation cd path/to/joomla/root
Step 4:
Type in
composer require joomla/github:dev-master
--
And yes the documentation needs updating, will work on that before Google Summer of Code starts in the next weeks.
There isn't a concept of "downloadable production ready packages" when it comes to the Composer ecosystem. Even if there were, in many cases you would need to build a package specific to an environment so you really couldn't have a one size fits all solution.
I know at least some of the packages which are available in Composer can also be downloaded and used without it. Sure, you need to take care of the dependancies manually (obviously) then but in this case here it wouldn't be needed.
Maybe "production ready" was the wrong term.
The things Composer takes care of that you would have to do if you cloned any of our Framework repos' src/
directories (same applies to any package basically, but narrowing scope for the sake of making it easier to explain):
The first one is easy to duplicate. Traverse the dependency chain and download all the necessary pieces. The second one you can either write your own autoloader or have a Bootstrap file to require_once
all the files.
I'm lazy, so I let a tool do all that for me
Indeed, the autoloader will be tricky.
Yves doc however is useless for an extension like com_localise. How would that be done for an extension? Eg how will you do this for patchtester (4.0 compatible version), assuming it will use this package?
That would help the usecase of JMS.
I don't use JGithub
or the Framework's GitHub package because that code lacks some of the flexibility I need.
Nonetheless, I do have a Composer integration in patchtester to use its autoloader versus JLoader
and how that is all set up would work just fine for com_localise in theory.
hmm, looks like I am in bad shape...
@infograf768 I may have a look when 3.7 is released and I get some free time to look at 4.0. With the example of com_patchtester I may be able to figure out how to do it for com_localise.
Category | ⇒ | com_languages |
Priority | Medium | ⇒ | Low |
Status | New | ⇒ | Discussion |
Closed as not a core issue
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-12-25 15:04:09 |
Closed_By | ⇒ | brianteeman |
For reference, this is how we solved it for com_localise: joomla-projects/com_localise#322
@infograf768 see https://github.com/joomla-framework/github-api