Package Details: tree-sitter-php 0.24.2-3

Git Clone URL: https://aur.archlinux.org/tree-sitter-php.git (read-only, click to copy)
Package Base: tree-sitter-php
Description: PHP grammar for tree-sitter
Upstream URL: https://github.com/tree-sitter/tree-sitter-php
Licenses: MIT
Groups: tree-sitter-grammars
Provides: libtree-sitter-php.so
Submitter: Chocobo1
Maintainer: Chocobo1
Last Packager: Chocobo1
Votes: 1
Popularity: 0.032076
First Submitted: 2025-03-06 17:03 (UTC)
Last Updated: 2026-01-03 18:18 (UTC)

Latest Comments

Chocobo1 commented on 2026-01-03 18:18 (UTC)

It's missing some symbolic links under the /usr/lib/tree_sitter/ directory. Would make packages like neovim or neovim-nvim-tree-sitter failed to detect the language even if the package is installed.

Fixed.

Chocobo1 commented on 2025-12-18 14:10 (UTC)

It's missing some symbolic links under the /usr/lib/tree_sitter/ directory. Would make packages like neovim or neovim-nvim-tree-sitter failed to detect the language even if the package is installed.

Please report to upstream.

nightfeather commented on 2025-12-18 08:26 (UTC) (edited on 2025-12-18 08:27 (UTC) by nightfeather)

It's missing some symbolic links under the /usr/lib/tree_sitter/ directory. Would make packages like neovim or neovim-nvim-tree-sitter failed to detect the language even if the package is installed.

And this is the patch I'm currently using:

diff --git a/PKGBUILD b/PKGBUILD
index ae816e4..e800090 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -33,6 +33,9 @@ package() {
   cd "$pkgname-$pkgver"

   make DESTDIR="$pkgdir" PREFIX="/usr" install
+  mkdir -p "$pkgdir/usr/lib/tree_sitter/"
+  ln -s "/usr/lib/libtree-sitter-php.so" "$pkgdir/usr/lib/tree_sitter/php.so"
+  ln -s "/usr/lib/libtree-sitter-php_only.so" "$pkgdir/usr/lib/tree_sitter/php_only.so"
   install -Dm644 "LICENSE" -t "$pkgdir/usr/share/licenses/tree-sitter-php"
   install -Dm644 "README.md" -t "$pkgdir/usr/share/doc/tree-sitter-php"

Chocobo1 commented on 2025-12-01 06:39 (UTC)

I'm getting a build error when trying to install

Fixed.

jimmycabbage commented on 2025-11-30 23:41 (UTC)

I'm getting a build error when trying to install

Relevant portion of building with yay:

==> Starting build()...
Error when generating parser

Caused by:
    Failed to load grammar.js -- No such file or directory (os error 2)
==> ERROR: A failure occurred in build().
    Aborting...
 -> error making: tree-sitter-php-exit status 4