using phpdocumentor with Symfony3 - symfony

I am wanting to use phpDocumentor with Symfony3. since they are not compatable with eachother as explained here I have installed phpDocumentor using pear as recomended.
My buidl.xml calls it like this.
<target name="phpdoc" description="Generate API documentation using PHPDocumentor">
<exec logoutput="true" command="/usr/bin/phpdoc -d ${source} -t ${basedir}/build/api" />
</target>
and when I run $ phing
I get the following error.
MyProject > phpdoc:
[exec] PHP Warning: require_once(/home/username/workspace/MyProject/vendor/dompdf/dompdf/dompdf_config.inc.php): failed to open stream: No such file or directory in /usr/share/php/phpDocumentor/src/phpDocumentor/Bootstrap.php on line 178
there is no dompdf/ folder in my vendor/ directory since it was not installed using composer
Is there anything else that I can use?
Is there a way of stopping phpdoc looking for a composer.json file and using the vendor directory of the project?

That'll likely be a bug. Right now, the PEAR and Composer installations might be unreliable. The development team recommends the PHAR instead, at least for now -- https://github.com/phpDocumentor/phpDocumentor2/issues/1859

Related

Where do I find JavaFX ant tasks in Java 11?

VSCode, Java 11 JavaFX 18.0.2
I am trying to package my code up for distribution as a desktop app. In my case I want a fully self-contained app because of my target user's profile.
I have been through Jenkov add the Oracle docs here and here which suggest I need ant-javafx.jar. That jar file seems to have been dropped from the standard Java SDK some time around Java 7 and put into the regular JavaFX install lib folder.
It's not there in the build I have.
JavaFX seems to have gone to openjfx.io and nowhere in there can I see support for the ant packaging jar. In fact I see openjfx as a retrograde step as they are increasingly forcing everyone into paid plans (try going round and round the loop of downloading anything that doesn't require an LTS payment).
I have a suspicion that there is some silent assumption that everyone will use something from maven or gradle, and maybe the packaging tools are buried away in one of those build tools. For historical reasons I don't use either and it should be possible to do this packaging without one of them.
So where do I get the JavaFX Ant build tasks from without having to pay someone?
I have found that the following works as an alternative with Java 19 and OpenJFX 19. I use the maven-dependency-plugin to copy all the dependency jars (excluding JavaFX, which I use as modules from a "full" JDK [one that includes JavaFX)] into the target/lib directory.
#!/bin/bash
set -o errexit
set -o noclobber
set -o xtrace
# find dependency modules of required modules
DEP_MODS=$(jdeps -quiet --class-path "target/lib/*" --add-modules java.base,java.logging,java.sql,javafx.controls,javafx.fxml --multi-release base --ignore-missing-deps --print-module-deps target/myapp-4.0-beta.jar)
# create a modular runtime image
jlink --compress=1 --no-header-files --no-man-pages --add-modules "java.logging,java.sql,javafx.controls,javafx.fxml,$DEP_MODS" --output target/myapp-4.0-beta
# Example of running it out of the runtime image
# TEST target/myapp-4.0-beta/bin/java -cp "../../myapp-4.0-beta.jar:../../lib/*" org.myapp.App
# symlink to the artifact jar from the lib directory
$(cd target/lib && ln -s ../myapp-4.0-beta.jar)
# use the lib directory and modular runtime image as input to jpackage
jpackage --input target/lib --runtime-image target/myapp-4.0-beta --main-jar myapp-4.0-beta.jar --main-class org.myapp.App --type app-image --app-version 4.0 --name app --dest target/dist/bundle --mac-entitlements src/dist/mac/entitlements.plist

Alfresco - Custom AMPs does not show even though installed

To add my custom amps I start from the base images:
alfresco/alfresco-content-repository-community:7.1.0
alfresco/alfresco-share:7.1.0.1
Then I copy my custom AMPs on to /usr/local/tomcat/amps and /usr/local/tomcat/amps_share followed by running:
RUN java -jar /usr/local/tomcat/alfresco-mmt/alfresco-mmt*.jar install \
/usr/local/tomcat/amps_share /usr/local/tomcat/webapps/share -directory -nobackup -force
RUN java -jar $TOMCAT_DIR/alfresco-mmt/alfresco-mmt*.jar install \
$TOMCAT_DIR/amps $TOMCAT_DIR/webapps/alfresco -directory -nobackup -force
When I check the installed modules in the container with alfresco-mmt list I can see that they are installed. They also seem fine in the logs. However, when I go to: http://localhost:8080/share/page/console/admin-console/module-package it says No module packages found. Can someone explain this? How do I go about this? I have found no information at all in the official documentations or by googling.
I've also noticed that there are no .war files in the /usr/local/tomcat/webapps directory. Should there be a .war file in the docker containers or have they been replaced when deploying with containers? Any explanation is helpful. Thanks!

How do I build my own phar archive for PHPUnit?

I've downloaded the current version of PHPUnit from Github and made a small customization. I now want to create my own phar archive for it. I see there is a build.xml file included with PHPUnit that looks like it contains the directives needed for creation of the phar archive, but after reading up on phar for a bit, it's still not clear to me what the commands are to make it happen for PHPUnit. Any advise is appreciated!
Cloning the repo. I guess you have this already but to be complete
$ git clone https://github.com/sebastianbergmann/phpunit
Change into it
$ cd phpunit
A build.xml files means (mostly) that Ant is used as build management system. To figure out which targets the project (-p) provides just ask ant itself:
$ ant -p
Then you should get this output:
Buildfile: /private/tmp/phpunit/build.xml
Main targets:
clean Cleanup build artifacts
composer Install dependencies with Composer
pdepend Calculate software metrics using PHP_Depend
pear Create PEAR package of PHPUnit and all its dependencies (release)
phar Create PHAR archive of PHPUnit and all its dependencies (release)
phar-alpha Create PHAR archive of PHPUnit and all its dependencies (alpha)
phar-beta Create PHAR archive of PHPUnit and all its dependencies (beta)
phpab Generate autoloader script
phpcpd Find duplicate code using PHPCPD
phpcs Find coding standard violations using PHP_CodeSniffer
phpcs-ci Find coding standard violations using PHP_CodeSniffer
phpdox Generate software project documentation using phpDox
phploc Measure project size using PHPLOC
phpmd Perform project mess detection using PHPMD
phpmd-ci Perform project mess detection using PHPMD
phpunit Run unit tests with PHPUnit
prepare Prepare for build
Default target: build
The rest is simple - just type
$ ant phar
The task will install Composer (even if you already have it, but copies it into the current folder) and downloads all dependencies.

packaging jruby gems in self contained jar

I'm trying to package compass/sass into a self-contained jar so that I can use compass without installing jruby.
I installed jruby and warbler on a Windows7 machine, running Java 1.6.0_37
I created a folder, named it jrcompass, then installed compass into it, i.e.
jruby -S gem install compass -i .
then I ran in it:
jruby -S warble
which created a file named jrcompass.jar of about ~20MB in size. so far so good.
problem is that when I try to execute the jar I get an error message (below). it seemed from the error that jruby.home was not set, so I passed it as a property in the command line and that worked, but it defeats the purpose of having a self-contained jar.
if I try to pass . as jruby.home then I get an error that it can't find rubygems
any help would be appreciated. TIA.
C:\Apps\test\jrcompass>java -jar jrcompass.jar
Gem::LoadError: Could not find compass (>= 0) amongst [rake-0.9.2.2]
to_specs at jar:file:/C:/Users/Admin/AppData/Local/Temp/jruby9093955264697226808extract/jruby-stdlib-1.7.1.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/dependency.rb:247
to_spec at jar:file:/C:/Users/Admin/AppData/Local/Temp/jruby9093955264697226808extract/jruby-stdlib-1.7.1.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/dependency.rb:256
gem at jar:file:/C:/Users/Admin/AppData/Local/Temp/jruby9093955264697226808extract/jruby-stdlib-1.7.1.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems.rb:1231
(root) at file:/C:/Apps/test/jrcompass/jrcompass.jar!/jrcompass/bin/compass:22
load at org/jruby/RubyKernel.java:1046
(root) at file:/C:/Apps/test/jrcompass/jrcompass.jar!/META-INF/main.rb:1
require at org/jruby/RubyKernel.java:1027
(root) at file:/C:/Apps/test/jrcompass/jrcompass.jar!/META-INF/main.rb:1
(root) at jar:file:/C:/Users/Admin/AppData/Local/Temp/jruby9093955264697226808extract/jruby-stdlib-1.7.1.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/custom_require.rb:1

Symfony 2.0 bundle installation

So I am a new to doctrine, but I am not able to install a bundle at all. I am following the guide, but the "error" which I am getting is very unusual.
Anyhow, I add this lines into deps file:
[FOSRestBundle]
git=http://github.com/FriendsOfSymfony/FOSRestBundle.git
target=bundles/FOS/RestBundle
Then I do:
./bin/vendors install
And I get:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626+lfs/sqlite.so' - /usr/lib/php5/20090626+lfs/sqlite.so: cannot open shared object file: No such file or directory in Unknown on line 0
Your project seems to be based on a Standard Edition that includes vendors.
Try to run ./bin/vendors install --reinstall
So on this standard way I am not able to install it at all. Can somebody explain me what is the problem, because to me it looks like, the symfony vendors script doesnt recognize changes in deps file at all.
This happens when you've downloaded the Symfony2 Standard Edition from the website. The vendor install script checks to see if the vendor directories are git repositories, and if not, will throw this error. You can fix the situation in one of two ways:
you can either run the command that it suggests: php bin/vendors install --reinstall
or, you can remove the vendors directory, then run php bin/vendors install, which amounts to about the same thing
No need to install that. Just follow the steps in the url : http://mmoreramerino.github.com/GearmanBundle/installation.html

Resources