Previously, `addLessFile` and `addModuleLessFile` called `realpath()` but
skipped the readability check, silently appending `false` when a path did
not resolve. `setTheme` and `setThemeMode` checked readability but stored
the unresolved path and swallowed errors via `Logger::error`.
`resolveReadableFile()` centralizes both steps: it calls `realpath()` and
verifies the result is a readable file, throwing a `RuntimeException` on
failure so no invalid path can be registered silently.
Add missing PHP type declarations to properties and methods, replace long-form
`array()` syntax with short `[]` syntax, tighten PHPDoc comments, and correct
"LESS" to "Less".
Replace the in-tree `Icinga\Less\` visitor layer with its equivalents
from `ipl\Web\Less`, where the same color-variable and light-mode
functionality is maintained as a shared library.
`LessCompiler` is updated to delegate to `WikimediaLessCompiler`,
assembling source via `@import (less)` directives and accepting a
`$minify` flag directly on `render()` rather than through a separate
`compress()` call.
This reverts commit 7c58b3ced1.
Remove variable exports as they were never used in our modules or community
modules, and using this feature is discouraged.
Using the following in a module's less file:
```
@exports: {
@foo: "bar";
@number: 4;
@color: red;
};
```
will export the variables `@foo`, `@number` and `@color` into the global
scope. Though, exports are not able to override already defined variables.
That's still reserved for themes.
The embedded font is included inline in the stylesheets. IE falls back and
tries to load one of the other font sources which was not exported by the web
server. This fix moves the fontello directory to public and add add a
prefix path to the embedded stylesheet.
refs #6417
This doesn't make it much better but allows to build a package
libicinga-vendor-php placing those files to /usr/share/php/IcingaVendor
or similar.
refs #4075