Name: phan Version: 6.0.10 Release: 1.ci.e915eac5a54b%{?dist} Summary: Static analyzer for PHP License: Apache-2.0 AND BSD-3-Clause AND ISC AND MIT AND OSL-3.0 URL: https://github.com/phan/phan Source0: %{url}/archive/refs/tags/%{version}.tar.gz#/phan-%{version}.tar.gz Source1: phan-%{version}-vendor.tar.bz2 Source2: _phan Source3: phansnippet.vim Source4: phan-php.vim Source5: phan-pylint.vim Source6: phan.bash BuildArch: noarch BuildRequires: php-cli >= 8.1 BuildRequires: php-ast # Build-time RPM generator: emits the bundled(php-composer(...)) provides # from vendor/composer/installed.php. BuildRequires: composer-generators Requires: php-cli >= 8.1 Requires: php-ast Recommends: php-phan-helpers %global debug_package %{nil} %description Phan is a static analyzer for PHP that prefers to minimize false positives. It checks for type errors, dead/unreachable code, and many other bug categories, using the php-ast extension to parse code. %prep %autosetup -n phan-%{version} # vendor/ is regenerated into Source1 at `make srpm` time (offline-gate rule). tar -xf %{S:1} %build # Nothing to compile — phan is plain PHP and vendor/ is pre-bundled (Source1). %install install -d %{buildroot}%{_datadir}/phan # Ship all three CLIs, the src tree, internal/ stubs, and .phan/ (the builtin # analysis plugins phan loads at runtime from .phan/plugins), plus the vendored # vendor/. phan's bins do `require __DIR__/src/phan.php`, so they sit beside src/. cp -a phan phan_client tocheckstyle src internal .phan vendor \ %{buildroot}%{_datadir}/phan/ # Strip VCS and dev-tool artifacts from the vendored tree. find %{buildroot}%{_datadir}/phan/vendor \ \( -name '.gitignore' -o -name '.github' -o -name '.phpdoc' \ -o -name '.php-cs-fixer.php' \) -exec rm -rf {} + install -d %{buildroot}%{_bindir} ln -s %{_datadir}/phan/phan %{buildroot}%{_bindir}/phan ln -s %{_datadir}/phan/phan_client %{buildroot}%{_bindir}/phan_client ln -s %{_datadir}/phan/tocheckstyle %{buildroot}%{_bindir}/tocheckstyle # zsh completion (export-ignored upstream; from Source2) install -Dpm0644 %{SOURCE2} %{buildroot}%{zsh_completions_dir}/_phan # bash completion (export-ignored upstream; from Source6) install -Dpm0644 %{SOURCE6} %{buildroot}%{bash_completions_dir}/phan # vim integration (export-ignored upstream; opt-in, under the pkg datadir) install -Dpm0644 %{SOURCE3} %{buildroot}%{_datadir}/phan/plugins/vim/phansnippet.vim install -Dpm0644 %{SOURCE4} %{buildroot}%{_datadir}/phan/plugins/vim/syntax/php.vim install -Dpm0644 %{SOURCE5} %{buildroot}%{_datadir}/phan/plugins/vim/syntax/pylint.vim %check # Use the buildroot path directly; the /usr/bin symlink resolves to install # destination which doesn't exist yet at check time. php %{buildroot}%{_datadir}/phan/phan --version %files %license LICENSE LICENSE.LANGUAGE_SERVER LICENSE.PHP_PARSER LICENSE.PHPSTORM_STUBS %doc README.md NEWS.md Phan-AGENTS.md V6_GENERICS.md MAINTAINERS.md %{_bindir}/phan %{_bindir}/phan_client %{_bindir}/tocheckstyle %{bash_completions_dir}/phan %{zsh_completions_dir}/_phan %{_datadir}/phan/ %changelog * Tue Oct 13 2026 Bahtiar `kalkin-` Gadimov - 6.0.10-1 - Update to 6.0.10 - Complete --dump-phase-timings and --phase-timings-json in the shell completions * Wed Jun 24 2026 Bahtiar `kalkin-` Gadimov - 6.0.7-1 - Initial package