저는 젠킨스 2 PHP 애플리케이션을 빌드하고 배포하기 위해 젠킨스 작업을 설정하고 있습니다. 내 개미 스크립트에서 php 파일의 유효성 검사를위한 린트 작업을 정의했습니다.Jenkins에서 Zend Framework PHP 애플리케이션 빌드 및 배포
lint가 ZF2 라이브러리 파일에서 오류를 감지했기 때문에 빌드 작업이 실패했습니다.
[apply] PHP Fatal error: Constructor Zend\Captcha\Factory::factory() cannot be static in /var/lib/jenkins/workspace/XXX/vendor/zendframework/zendframework/library/Zend/Captcha/Factory.php on line 90
[apply] Errors parsing /var/lib/jenkins/workspace/XXX/vendor/zendframework/zendframework/library/Zend/Captcha/Factory.php
아무도 Zend/Captcha/Factory.php fails
의 이유 검증을 알고 있나요
이
는 출력은 보풀에 의해 생성된다?개미 작업은 다음과 같습니다 젠드 프레임 워크는 PHP 5.3.3 이상이 필요하기 때문에
<target name="lint" description="Perform syntax check of sourcecode files">
<apply executable="php" failonerror="true">
<arg value="-l" />
<fileset dir="${basedir}/">
<include name="**/*.php" />
<modified />
</fileset>
<fileset dir="${basedir}/tests">
<include name="**/*.php" />
<modified />
</fileset>
</apply>
</target>
귀하의 질문은 귀하가 직업 정의를 게시 한 경우 장래의 방문객에게 더 유용 할 것입니다. 질문에 대답하는 사람의 능력에 차이를 만들지는 모르겠지만 (이것이 내가 downvoted하지 않은 이유입니다) 일반적으로 오류 메시지를 게시하는 것은별로 도움이되지 않습니다. – Ben
어떤 PHP 버전을 사용합니까? 일반적으로 정적 팩토리 메서드에는 아무런 문제가 없습니다 (생성자가 전혀 없습니다). 최신 태그 (2.0.3)는 다음과 같으며 내 컴퓨터 (php 5.3.14)에서 잘 보냈습니다. https://github.com/zendframework/zf2/blob/7f49f1e1a22994ea5d7cf4da1c49119df274b99d/library/Zend/Captcha/Factory.php # L20 –
@ 유리 주석 : 답변 해 주셔서 감사합니다. PHP 5.3.2-1ubuntu4를 사용하고 있습니다.18 Suhosin-Patch – MadeOfSport