text:
Handle multiboard diagrams

Composition is currently not supported due to D2 limitiation:
err: failed to compile test.d2: multiboard output cannot be written to stdout

There is this comment in D2 source code but no related issue, so chances are this will not be fixed in a near future.
It doesn't allow outputting to stdout because such diagrams produce multiple files. I can either fix this in D2 or figure out how to embed such diagrams in HTML and use a temporary file for rendering.

I see 2 use cases that can be handled differently:

to generate a single, animated file, like what d2 is showcasing, but I'm not really impressed, I'm not sure about the use case. animation gets in the way of reading the diagram
to generate the layer we want, to have a single diagram source, but multiple output depending on the location in the documentation. with an attribute, let's say { target="scenario_id } for example.

I find the second use case more interesting. The only other way to do that, is to duplicate the diagram, just to display a bit more information. and it breaks the only one golden source rule.

It would not be enough to get this feature to work, but the first step would be to stop generating diagrams to stdout in this plugin, and generate it to file directly. At least it would not get the multiboard output cannot be written to stdout error.
As a second step, it would require to analyze the output, and include the correct file, depending on the target passed as parameter of the include directive.
![](diagram.d2)

would result as including the generated_folder/index.svg file.
![](diagram.d2){scenario="wave_back_scenario"}

would result as including the generated_folder/scenarios/wave_back_scenario.svg file.
![](diagram.d2){layer="wave_back_layer"}

would result as including the generated_folder/layers/wave_back_layer.svg file.
What do you think?

For the reference, an issue somewhat related to this one, on D2 side: https://github.com/terrastruct/d2/issues/1707

If it can be handled on D2 side, I would strongly prefer that. This plugin is supposed to be simple and easy to pick up if you are already familiar with D2. There are 4 plugin-specific config options which do not affect rendering (executable, cache, cache_dir and render). Everything else is a 1:1 mapping to D2 command line flags, so if you want to know what an option does, just run d2 --help or search docs. Documentation of this plugin does not need to go into details about anything D2-related and the plugin itself does not introduce any new concepts. I would like it to stay that way.
What is more, D2 does not have a stable release and changes constantly. The plugin has no control over which version of D2 a user has. As a result, analyzing D2 output is a non-goal for this project as it could break at any point. I am considering removing hard-coded D2 options in favor of passing user-entered data as is to D2, allowing users to pass anything their version of D2 offers. For now the plugin only supports options I deemed useful, which is not ideal.
I recently implemented a feature and fixed a bug in D2, so I will look into the issue you linked, I may be able to implement it. No promises though, as it requires my free time and interest.

Hi,
Just to clarify, since I think I have been misunderstood : I am not requesting to implement something in this plugin that is not handled by d2. That's why I'm referencing the issue on d2 side, just to keep an eye on it.
I get it about the stability of d2. what you are implying is that the implementation that could be done in the plugin, is that you fear that the current behavior of d2 may change over time so this feature will break. correct?
in this case, we can wait for the issue on d2 side, hoping it will work with stdout too, which is used by the plugin if I understand well the error message.
as of today, the plugin is really good already, and we can't ask it to be better than d2. And thanks for that!

The issue with implementing this on the plugin side is that the plugin has no idea what to expect from the output. If you create a diagram with scenarios or layers, the output is a directory with, from the perspective of the plugin, randomly named files and directories. If you had nested layers, the output would be several directories deep. The plugin would have to parse your input, figure out the entire path and hope the file exists. It's a lot of complexity for something that would be deprecated (or removed) as soon as it is implemented in D2.
When it gets implemented in D2, the output would be a single file so it should work just fine with stdout.

I opened a PR in D2 repo. When/if it gets merged, I will add support for --board flag in the plugin.

Great job, thanks a lot!

Hello,
The improvement has been done on d2 side. I have been working on a MR for your plugin so it can handle the flag, but as it looks like, the plugin is using ENV VAR to pass configuration:
result = subprocess.run(
            [
                executable,
                "-",
                "-",
            ],
            env={**os.environ, **env},

...

def env(self) -> Dict[str, str]:
        return {
            "D2_LAYOUT": self.layout,
            "D2_THEME": str(self.theme),
            "D2_DARK_THEME": str(self.dark_theme),
            "D2_SKETCH": "true" if self.sketch else "false",
            "D2_PAD": str(self.pad),
            "SCALE": str(self.scale),
            "D2_FORCE_APPENDIX": "true" if self.force_appendix else "false",
        }

However, they have not associated any ENV VAR to this flag:
	scaleFlag, err := ms.Opts.Float64("SCALE", "scale", "", -1, "scale the output. E.g., 0.5 to halve the default size. Default -1 means that SVG's will fit to screen and all others will use their default render size. Setting to 1 turns off SVG fitting to screen.")

...

	targetFlag := ms.Opts.String("", "target", "", "*", "target board to render. Pass an empty string to target root board. If target ends with '*', it will be rendered with all of its scenarios, steps, and layers. Otherwise, only the target board will be rendered. E.g. --target='' to render root board only or --target='layers.x.*' to render layer 'x' with all of its children.")

https://github.com/terrastruct/d2/blob/fa98423492fd9ee26e9be86a320f7777e0cb125b/d2cli/main.go#L120

To me, I first need to add an ENV VAR to d2 through an MR, and wait for its release, before I can propose an MR to you.
Is this correct or am I missing something?

on a second thought, it makes sense not to add an environment variable, as the setting is local to the file, while other settings as environment variable can be used on all d2 files.
I see 2 options here:

Add the possibility to use flags alongside environment variables, but that makes two different settings handlers
Switch from environment variable to command line flags. It looks like both easier and cleaner to me.

WDYT?

authors: Karreg landmaj


text:
🛑 vipgifts.net is down

In aca6311, vipgifts.net (https://vipgifts.net) was down:

HTTP code: 0
Response time: 0 ms

Resolved: vipgifts.net is back up in 98854bd after 6 minutes.

source: gharchive/issue

repo: lanen/bs-site

license: MIT

license_type: permissive

license_source: github-api


text:
🛑 vipgifts.net is down

In 4af98b2, vipgifts.net (https://vipgifts.net) was down:

HTTP code: 567
Response time: 717 ms

Resolved: vipgifts.net is back up in 2a531f6 after 15 minutes.


text:
🛑 vipgifts.net is down

In fcd52e3, vipgifts.net (https://vipgifts.net) was down:

HTTP code: 567
Response time: 487 ms

Resolved: vipgifts.net is back up in 6bb0ed1.


text:
🛑 trixmall.com is down

In 825664e, trixmall.com (https://www.trixmall.com/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: trixmall.com is back up in 2d32292.


text:
🛑 rexingsports.cn is down

In 41b7da1, rexingsports.cn (https://www.rexingsports.cn) was down:

HTTP code: 567
Response time: 978 ms

Resolved: rexingsports.cn is back up in 797c058 after 18 minutes.


text:
🛑 vipgifts.net is down

In 369f4ad, vipgifts.net (https://vipgifts.net) was down:

HTTP code: 567
Response time: 430 ms

Resolved: vipgifts.net is back up in 084edbd after 19 minutes.


text:
🛑 vipgifts.net is down

In e888986, vipgifts.net (https://vipgifts.net) was down:

HTTP code: 567
Response time: 646 ms

Resolved: vipgifts.net is back up in 4c8893d after 21 minutes.


text:
🛑 rexingsports.cn is down

In 8528b11, rexingsports.cn (https://www.rexingsports.cn) was down:

HTTP code: 567
Response time: 740 ms

Resolved: rexingsports.cn is back up in 72a1f7a after 20 minutes.


text:
Adding support for Gemini

Hi, I added ChatVertexAI from langchain_google_vertexai to models.py file to use gemini models. However, the issue is that i am getting InvalidArgument: 400 Request contains an invalid argument error with the current code when invoking the model with a text and a schema. Just wondering if you have some insights on this as it seems that this is going to be a feature in your next release? Thanks.

It worked fine with the code for the first release of langchain-extract. Thanks.

repo: langchain-ai/langchain-extract


text:
Integration of Cambridge Semantics AnzoGraph DB in LangChain community (graphs and chains)

[x] PR title: "community: add integration to AnzoGraph DB"

[x] PR message:

Description: To support the integration of the AnzoGraph DB graph database system, we included Python modules and modified Python files within LangChain's GraphQA chains and LangChain Community graphs. We developed two modules and modified one init.py file and one prompts.py module to enable support for Cambridge Semantics' AnzoGraphDB. One langchain_community init.py file was modified to include the path for the AnzoGraph DB graph module. The prompts.py file (located in langchain_community/chains/graph_qa) was modified to incorporate AnzoGraph DB prompt templates.
Dependencies: pip install rdflib and pip install sparqlwrapper (included in pyproject.toml and poetry.lock)
Twitter handle: @MarcCorrAI

[x] Add tests and docs:

Unit test for testing the integration file is included in folder <langchain\docs\docs\integrations\graphs>, accompanied by the foaf ontology file to perform the test locally.
Both integration files were added, as requested:
anzograph.ipynb (path in LangChain website: components/graphs/AnzoGraphDB), for inclusion at  https://python.langchain.com/v0.1/docs/integrations/graphs/
and anzograph.mdx (path in LangChain website: providers/AnzoGraphDB) for inclusion at   https://python.langchain.com/v0.1/docs/integrations/providers/

[x] Lint and test: Run make format, make lint and make test from the root of the package(s) you've modified. See contribution guidelines for more: https://python.langchain.com/docs/contributing/
"Make tests" were run (test, format_diff, lint_diff, spell_fix). One pytest and unittest is included in the directory "langchain/libs/community/tests/unit_tests/graphs".

I can not view the Build Status of this failed deployment.
I ask for support to analyze if some changes I promoted are breaking the Vercel deployment.
In https://github.com/langchain-ai/langchain/actions/runs/9184543771 I have the warning:
This workflow is awaiting approval from a maintainer in https://github.com/langchain-ai/langchain/pull/22012
I am encountering a challenge with our CI/CD process on Vercel.
Unfortunately, I am unable to access the deployment log files for the recent builds.
This issue is preventing me from diagnosing and resolving errors that have occurred during the deployment process.

I reviewed/rebuilt the two poetry.lock and pyproject.toml.
Please try to merge it.
@baskaryan

I'm passing all the tests except for some tricky ones on date formats. However, I don't use these modules and I'm not sure what that means.
Could you please help resolve this issue?
Thank you

@baskaryan

I'm passing all the tests except for some tricky ones on date formats. However, I don't use these modules and I'm not sure what that means. Could you please help resolve this issue?
Thank you
@baskaryan

@baskaryan @hwchase17
Hi everyone,
We've been waiting for support on this issue for a while. Even after running make test on an updated master branch, the assertion errors remain. We believe it is a condition that is out of our control.
We'd like to ask you to review this issue regarding the failing unit tests mentioned below:
FAILED tests/unit_tests/chat_loaders/test_imessage.py::test_imessage_chat_loader_upgrade_osx11 - AssertionError: date failed to parse
FAILED tests/unit_tests/chat_loaders/test_imessage.py::test_imessage_chat_loader - AssertionError: date failed to parse
Thank you!

source: gharchive/pull-request

repo: langchain-ai/langchain


text:
doc: Contributing rules

The documentation should have a section on how to contribute rules. It should cover benchmarking them on the files in bench/, link to the grammar, remind about rule categories, and link to sections on writing rules, building from source, and writing tests with lit.

In the meantime, see https://github.com/langston-barrett/souffle-lint/pull/40 for how to add a rule.

repo: langston-barrett/souffle-lint


text:
Improve documentation

I think documentation is super important to ramping newcomers. This PR is the first of a couple that I plan on making that aims to improve documentation. It's also littered with spelling fixes and a couple TODOs that I'll clean up once I get answers to the contained questions.
I've commented where I have questions. Apologies if I don't get everything right. Just started with the project and I'm learning along the way!
Screenshot of lib.rs doc comment. I'd love to host Floem's rust docs on github pages in a separate PR.

Thanks so much for this PR. This is invaluable work, because docs are probably as important as the code itself for users!
As for hosting part, I guess we can use docs.rs once we land ourselves to crates.io?

Thanks so much for this PR. This is invaluable work, because docs are probably as important as the code itself for users!
As for hosting part, I guess we can use docs.rs once we land ourselves to crates.io?

creates.io would work for hosting! I suggested GH pages to host docs in the meantime because I'm not sure how long until this will be published on crates.io

Great work! Thanks.

repo: lapce/floem


text:
Crash in find enclosing parentheses

Lapce Version
0.2.4 (Current HEAD)
System information
Linux
Describe the bug
When opening a new markdown file and typing, the editor crashed.
The log:
[2022-11-22][20:24:24][panic][ERROR] thread 'main' panicked at 'index out of bounds: the len is 0 but the index is 0': /home/minus/.cargo/registry/src/github.com-1ecc6299db9ec823/lapce-xi-rope-0.3.1/src/rope.rs:534
(cut)
   8: lapce_xi_rope::rope::<impl lapce_xi_rope::tree::Node<lapce_xi_rope::rope::RopeInfo>>::byte_at
   9: lapce_core::syntax::Syntax::find_enclosing_parentheses
  10: lapce_data::editor::LapceEditorBufferData::update_signature
  11: lapce_data::editor::LapceEditorBufferData::apply_deltas
  12: <lapce_data::editor::LapceEditorBufferData as lapce_data::keypress::KeyPressFocus>::run_command

Most consistent way I got it was:

empty markdown file
type asdf
Backspace repeatedly.
It will crash right as you backspace the a

(Also doing ctrl+A then backspace did the same thing)
Occurred for a couple of other files too.
I imagine this is the code assuming that there must be a value at the 0 index after an edit

repo: lapce/lapce


text:
Cannot Read property 'html' of null

Sometimes I get this strange error
var $ = html.html ? html : cheerio.load(html);
^
TypeError: Cannot read property 'html' of null
at load (/Users/christian/development/beacon/beaconJobs/node_modules/x-ray/index.js:166:19)
at /Users/christian/development/beacon/beaconJobs/node_modules/x-ray/index.js:85:19
at /Users/christian/development/beacon/beaconJobs/node_modules/x-ray/index.js:248:14
at _done (/Users/christian/development/beacon/beaconJobs/node_modules/x-ray/node_modules/x-ray-crawler/node_modules/enqueue/index.js:78:20)
at _once (/Users/christian/development/beacon/beaconJobs/node_modules/x-ray/node_modules/x-ray-crawler/node_modules/enqueue/index.js:93:15)
at result (/Users/christian/development/beacon/beaconJobs/node_modules/x-ray/node_modules/x-ray-crawler/lib/index.js:107:7)
at /Users/christian/development/beacon/beaconJobs/node_modules/x-ray/node_modules/x-ray-crawler/node_modules/wrap-fn/index.js:121:18
at /Users/christian/development/beacon/beaconJobs/init/xrayDriver.js:28:16
at Request.callback (/Users/christian/development/beacon/beaconJobs/node_modules/superagent/lib/node/index.js:788:12)
at Stream. (/Users/christian/development/beacon/beaconJobs/node_modules/superagent/lib/node/index.js:997:12)
at emitNone (events.js:72:20)
at Stream.emit (events.js:166:7)
at Unzip. (/Users/christian/development/beacon/beaconJobs/node_modules/superagent/lib/node/utils.js:108:12)
at emitNone (events.js:72:20)
at Unzip.emit (events.js:166:7)
at endReadableNT (_stream_readable.js:905:12)
at doNTCallback2 (node.js:441:9)
at process._tickDomainCallback (node.js:396:17)
I've checked the index.js file and I've found an odd code for the function load
function load(html, url) {
      var $ = html.html ? html : cheerio.load(html);
      if (url) $ = absolutes(url, $);
      return $;
    }

There is no check for the html variable so if html is null html.html will crash the code for sure
I haven't read all the code but I did a quick fix that is preventing the code to crash
  function load(html, url) {
      var $ = html ? html.html ? html : cheerio.load(html) : null;
      if (url && $) $ = absolutes(url, $);
      return $;
    }

Do you think that this is the solution for the issue? If it is so I can make a PR.
Best Regards

+1

authors: christiansaiki rentrop

repo: lapwinglabs/x-ray


text:
Confusion over default pagination documentation

There is some conflicting information in the docs regarding pagination behavior when no page query parameters are sent by the client.
Here, it implies that requests will always be paginated by default by what is defined on the model, or by what is set as the default on the paginator:

But here, there is a section about forcing pagination when no query parameters are set:

The latter is the behavior I observe as being correct but the documentation of the former makes this confusing and I'm not sure what the point of it is.

Ah yes I can see how that is confusing - thanks for raising.
For the page size section, it's talking about the page size it uses if the client provides page parameter but does not provide a page size for it. For example:
GET /api/v1/posts?page[number]=1
It will return a paginated response, with the page size specified on either the model, or the withDefaultPerPage() method if that has been used.
However if a client calls:
GET /api/v1/posts
i.e. no page parameters, then the response will not be paginated - unless you've set the $defaultPagination property, in which case the client will get a paginated response as per your default pagination settings.
Hope that makes sense? I'll update the docs.

@Wizofgoz chapter has been updated (but not deployed to the website yet). You can view it here:
https://github.com/laravel-json-api/docs/blob/develop/1.0/schemas/pagination.md#page-size
Does that make it clearer? Both sections have been updated.

@lindyhopchris yes, that makes a lot of sense. Thank you for the prompt response!

authors: Wizofgoz lindyhopchris

repo: laravel-json-api/laravel


text:
[6.*] npm run watch issue

v6 does not watch any file changes in node_modules, but the previous version does

just found out that v6 ignore node_modules by default
        watchOptions: {
            ignored: /node_modules/
        }

but how to override this thing?
already did this, still not work
mix.webpackConfig({
   watchOptions: {
      ignored: []
   }
});

What's the use case for not ignoring files inside node_modules?

@thecrypticace I've created a few npm packages and watching node_modules allow me to temporarily modify or test some codes instead of publishing it to npm, the previous version has saved me a lot of times tha re-run npm run watch
is there any way to disable it for my case?

I would expect what you posted to work to override the config. 🤔

@thecrypticace sadly still not work.. 😢

Yeah - it won't do that due to the merge strategy we use. I'll fix.

@JeffreyWay tq jeff

In the meantime, you can always use mix.override() to override the webpack config entirely.
mix.override((config) => {
    config.watchOptions = {
        ignored: [],
    };
});

Actually, this is a unique case. I'm not sure that it's worth adding a custom merge strategy. mix.override() is the easier option.

@JeffreyWay unfortunately, using mix.override will cause npm run watch to exit after [webpack-cli] watching files for updates...
😭

Try deleting it completely.
https://github.com/JeffreyWay/laravel-mix/commit/53ffe9f59d654ad5047daee00f003608b2d440b5

@JeffreyWay tq jeff, cli not exited, but any changes to node_modules does not reflect, any idea? ... hm weird 🤔

@JeffreyWay it detects changes but does not reflect inside output file..

Setup:
Laravel Mix Version: v6.0.10
Node Version: v12.19.0
NPM Version: v6.14.8
OS: Windows 10
Description
I'm in the same situation of vortechron
I have tried the following configurations, but nothing happens
// using glob to exclude only my package
mix.webpackConfig({ watchOptions: { ignored: 'node_modules/!(my-package)*' } })

// ignore nothing
mix.webpackConfig({ watchOptions: { ignored: [] })

Any changes made, even in the sources (not in vendor), are not bundled into the final file...
sometimes the changes seem to be detected (the cli window with the recap tableppears to "refresh"), but the produced file is not modified, it has always the same timestamp
Only the following configuration works, but the watch is only on my sources, the changes in my package are not tracked.
// ignore with regexp that shouldn't match any of my node_modules folder
mix.webpackConfig({ watchOptions: { ignored: /nothing/ })

Hope it helps...

Setup:
Laravel Mix Version: v6.0.10
Node Version: v12.19.0
NPM Version: v6.14.8
OS: Windows 10
Description
I'm in the same situation of vortechron
I have tried the following configurations, but nothing happens
// using glob to exclude only my package
mix.webpackConfig({ watchOptions: { ignored: 'node_modules/!(my-package)*' } })

// ignore nothing
mix.webpackConfig({ watchOptions: { ignored: [] })

Any changes made, even in the sources (not in vendor), are not bundled into the final file...
sometimes the changes seem to be detected (the cli window with the recap tableppears to "refresh"), but the produced file is not modified, it has always the same timestamp
Only the following configuration works, but the watch is only on my sources, the changes in my package are not tracked.
// ignore with regexp that shouldn't match any of my node_modules folder
mix.webpackConfig({ watchOptions: { ignored: /nothing/ })

Hope it helps...

I'm having the same issue as @risingphoenix. It's detecting the changes, but not bundling those changes into the outputted file.

@jwohlfert23 i am currently using this configuration
mix.webpackConfig({ watchOptions: { ignored: /node_modules([\\]+|\/)+(?!my-package)/ }});

every changes are detected but not inserted in the compiled watched js,
even with the command specified by @JeffreyWay nothing changes
mix.override((config) => {
	config.watchOptions = {
		ignored: /node_modules([\\]+|\/)+(?!my-package)/,
	};
});

very frustrating run every time npm run dev

Probably a bit late, but i just encountered the same problem (changes detected, but not included in the build), and finally found a solution, thanks to this comment, and this one.
I ended up with the following configuration:
mix.webpackConfig({
    resolve: {
        symlinks: false
    },
    snapshot: {
        managedPaths: []
    },
    watchOptions: {
        ignored: /node_modules([\\]+|\/)+(?!my-linked-local-package)/
    }
});

Changes made inside the linked local package, now correctly triggers a new build, including these changes 👍

Many thanks @chototoro, great solution!
My way of bypassing the problem was to create a local version, and perform an import on that file instead of the one in node_modules. Then make the changes and then publish it on the repository.

@chototoro I've got half success with your solution:

hot reload for node_modules work 100% PERFECT
but if I reload the page -> I am getting old version of file (without current node_modules/ changes)

authors: JeffreyWay chototoro darekf77 jwohlfert23 risingphoenix thecrypticace vortechron

repo: laravel-mix/laravel-mix


text:
eloquent  with closure exec builder select

when i use select, it can't return anything. like this

return  file_lists empty

i solve it

repo: laravel/framework


text:
Method 'save' not described in Illuminate\Contracts\Auth\Authenticatable

Method updateRememberToken() calls save() method on an object that implements Illuminate\Contracts\Auth\Authenticatable interface but this method is not described there and object may not contain such method.
Illuminate/Auth/EloquentUserProvider.php:
    public function updateRememberToken(UserContract $user, $token)
    {
        $user->setRememberToken($token);

        $user->save();
    }

it also assigns new remember token twice, setRememberToken() is also called before updateRememberToken():
Illuminate/Auth/Guard.php:
    protected function refreshRememberToken(UserContract $user)
    {
        $user->setRememberToken($token = Str::random(60));

        $this->provider->updateRememberToken($user, $token);
    }

Ah, we're just assuming if you're using the Eloquent provider ->save() is available.

but if you use custom auth driver and that driver implements only UserContract and don't have method save() there will be error

UserContract should have save() method defined or better implementation...

@taylorotwell These assumptions make it hard for other developers to replace your code, which is the primary reason for using the contract.
Adding the save() method would mean a major breaking change, but at least that is a break that can easily be detected, whereas this error will only be detected if / when someone finally calls updateRememberToken().

save() is only being used in EloquentUserProvider class, if let say you're using DatabaseUserProvider it never requires that (https://github.com/laravel/framework/blob/5.2/src/Illuminate/Auth/DatabaseUserProvider.php#L86).
Let's say one day someone wants to create DoctrineUserProvider, it doesn't depends that Authenticatable have save() method available.

@crynobone Then why not create another contract, or at least check if the given object has the save method... And then throw a proper exception describing that this user provider requires the save() function to be present.

If we pass in a different typehint (child of Authenticatable contract), would that break the UserProvider::updateRememberToken() contract https://github.com/laravel/framework/blob/5.2/src/Illuminate/Contracts/Auth/UserProvider.php#L31?

Even better, since EloquentUserProvider has the name of the model, it could do the save without breaking the contract; the contract specified getAuthIdentifierName() and getAuthIdentifier() giving me unique identifiers that I can use to find the Eloquent model, call setRememberToken() on it and then save() it.
That way I can pass in another implementation while still using it with EloquentUserProvider and in case I pass an actual Eloquent model instance than the query can be skipped and we save it directly.
Thereby you code against the interface you publish, you guarantee it works with any implementation of the interface, but you still get the optimization in case you pass in a specific type.

@crynobone  Yes it would, so I understand not doing that directly for this one case. Also if the save() is hardly ever required then adding it would be a burden to all implementors.
I'm just disagreeing with the implicit requirement that will never show up in testing, especially since there is a way to make it always work at a very minor cost of 1 query for cases where it does not work at all now, and the cost of 1 instanceof check for the situation where it currently works.

If there is a requirement, it should actually just check ($user instanceof Illuminate\Database\Model\Eloquent) and throws an exception if it's not. Since EloquentUserProvider is really just meant to be used with Eloquent.

I agree, but my point is there is an easy implementation that just works and obeys the contract... why not use that instead?
Like so:
public function updateRememberToken(UserContract $user, $token)
    {
        $user->setRememberToken($token);
        if ($user instanceof Illuminate\Database\Model\Eloquent) {
            $user->save();
        } else {
            // Taken from createModel()
            $model = $this->createModel()->newQuery()->find($user->getAuthIdentifier());
            $model->setRememberToken($token);
            $model->save();
    }

Some improvements still remaining, for example checking against the type $this->model instead of the base eloquent model. Also I don't know if this behavior is better than throwing an exception as you suggested. Either of those is better than just calling a function blindly though!
By the way, scrutinizer also detects these kinds of errors:
https://scrutinizer-ci.com/g/laravel/framework/code-structure/master/class/Illuminate\Auth\EloquentUserProvider#inspectioncomment-700653667

but my point is there is an easy implementation that just works and obeys the contract... why not use that instead?

Wouldn't that seem like allowing hacks to be implemented (hack here refer to sending  Authenticatable other than Eloquent instance).
if anything it should be.
    public function updateRememberToken(UserContract $user, $token)
    {
        $user->setRememberToken($token);
        if (! $user instanceof \Illuminate\Database\Model\Eloquent) {
            throw new \InvalidArgumentException('Expecting $user to be an instance of Eloquent');
        }

        $user->save();

        // ...
    }

That's fair enough; that is a decision that is outside of the purely technical scope and I'm not familiar enough with Laravel to go into that. However by doing this check you at least make the requirement on $user a bit more explicit.
Considering other scenarios where $user might be passed around internal functions several times and one of them could call save() this will make the life of a developer much simpler!

Considering other scenarios where $user might be passed around internal functions several times and one of them could call save() this will make the life of a developer much simpler!

This is what I mean by opening the possibility for hacks. Guard contract would retrieve the user using UserProvider contract, if you are set to use the EloquentUserProvider this would always return an eloquent instance.
The only times where this could change is for some reason you're using e.g LdapUserProvider and probably get a GenericUser, then during the request lifecycle you change the configuration to "eloquent" (not sure if this even possible) and then the code request "logout" which would update the remember token.
Now, the EloquentUserProvider accept the GenericUser, which my properly, this would throw an exception because it not possible to update the user using "eloquent" for LDAP users, which your suggestion it detect it's not an Eloquent and then still attempt to write the "eloquent".
Would you want to allow such hacks?

No, I don't see any use cases for those kinds of hacks, so exception seems like a great improvement to what is done currently.

authors: SamMousa andkom crynobone taylorotwell


text:
Illuminate\Foundation\Application method call isLocal() is case sensitive

isLocal() is case sensitive. Therefore is is important that we set our environment variables to all lowercase otherwise a call to isLocal() will give the wrong result.
APP_ENV = 'local'       isLocal() = true
APP_ENV = 'Local'      isLocal() = false
APP_ENV = 'LOCAL'   isLocal() = false
change...
return $this['env'] == 'local';

to...
return strtolower($this['env']) == 'local';

or...
return strtoupper($this['env']) == 'LOCAL';

Yes, it is case sensitive.

authors: GrahamCampbell ghkdev


text:
OrderBy enumeration in phpunit issue

Laravel Version: 5.4.32
PHP Version: 7.1.8
Database Driver & Version: mysql 5.7.14

Description:
Ordering by enumeration fields works as expected in browser environment; my enum field looks like this:
$table->enum('type', ['regular', 'featured', 'premium'])->default('regular');

If I order by type (ascending) it sorts the fields as expected, by enumeration index.
Inside the phpunit tests, this same code orders the fields alphabetically, not by enum index.
Steps To Reproduce:
This line of code returns the expected result in the browser (sorted by enum field index, so sorting goes: regular, featured, premium), but alphabetically sorts the results by enum fields in tests (sorting: featured, premium, regular):
return self::orderBy('type', 'asc')->get();

Those lines of code return error: General error: 1 no such function FIELD
return self::orderByRaw(DB::raw("FIELD(type, 'regular', 'featured', 'premiuim') asc"))->get();
return self::orderByRaw("FIELD(type, 'regular', 'featured', 'premiuim') asc")->get();

This line of code returns the expected result, but it's an ugly piece of code for such simple task:
return self::orderByRaw("CASE WHEN type='regular' THEN 0 WHEN type='featured' THEN 1 WHEN type='premium' THEN 2 ELSE 0 END")->get();

Why the behavior is different in tests and is there more elegant way to solve this issue?

are your tests using a different database?

I am using memory for testing, but the same migration and seeders

that is your issue.
in memory database doesnt really pay attention to field types, it will just treat it as a string.

So, I should just stick with the above working query if I want that fraction of a test?

Please ask on the forums, this repo is for bug reporting only. You can use https://laracasts.com/discuss or https://laravel.io/forum which are forums with a very large community of developers helping each other.

authors: kikky7 rs-sliske themsaid


text:
Using Redis on shared server with multiple Laravel application

Laravel Version: 5.5
PHP Version: 7.1
Database Driver & Version: Mysql

We have hosted two Laravel application on one server. Installed Redis & Supervisor.
In supervisor configuration (/etc/supervisord.conf) added two configuration
Application 1 configuration
[program:app1-supervisor]
process_name=%(program_name)s_%(process_num)02d
command=php //path/to/application/1/artisan queue:work redis --sleep=3 --tries=3 --daemon
autostart=true
autorestart=true
user=ladybirq
numprocs=8
redirect_stderr=true
stdout_logfile=/path/to/application/1/worker.log

Application 2 configuration
[program:app2-supervisor]
process_name=%(program_name)s_%(process_num)02d
command=php //path/to/application/2/artisan queue:work redis --sleep=3 --tries=3 --daemon
autostart=true
autorestart=true
user=ladybirq
numprocs=8
redirect_stderr=true
stdout_logfile=/path/to/application/2/worker.log

When application 1 sends email, It sends from application 2 mail configuration.
Email configuration is stored in database and on fly application set in the configuration
Example
$email = Email::first();
config(“mail.driver.$email->driver”);

So some values in the application 1 email get replaced with application 2 values.
Not sure where I am going wrong.
Have anyone configured Redis on the single server with multiple applications. Both our application are same.
We are using cPanel on this server and both the application are hosted in different cPanel account on the same server

Try setting a different value for this setting
https://github.com/laravel/laravel/blob/master/config/queue.php#L63

Hi there,
Welcome to Laravel and we are glad to have you as part of the community.
Unfortunately this github area is not a support area for general application issues. This is only for issues/bugs with the framework code itself. In this case - the problem is you are using the same queue tube name for both applications.
Can I please suggestion closing your issue ticket here. Instead trying asking your question on one of the many great community support areas that will likely give you a better answer more quickly:

Laravel Slack (https://larachat.co/)
Laravel.io Forum (https://laravel.io/forum)
Laracasts Forum (https://laracasts.com/discuss)
StackOverflow (http://stackoverflow.com/questions/tagged/laravel)

Thanks in advance.

authors: it-can laurencei vijaysebastian


text:
Q: BroadcastException - Fail gracefully if no Pusher server is running?

Hi
I am using Laravel Broadcast together with a websocket server. But I got a question regarding failing gracefully in the case the pusher server ist not running.
Right now, if the websocket serve is running all is working fine. But if the server is not running, all events trigger a
Illuminate \ Broadcasting \ BroadcastException
No message
exception in vendor\laravel\framework\src\Illuminate\Broadcasting\Broadcasters\PusherBroadcaster.php.

I could try/catch all events I am firing, but as I am also listening to Eloquent events this will become complicated.
Is there a way to fail gracefully in general? It shouldn't crash everything if the server e.g. has a hiccup, or should it?
I already checked the BroadcastServiceProvider with auth:api to support my Passport bearer and am allowing all channels for all users. Still, the issue.
Thanks a lot in advance

Hi there,
Thanks for reporting but it looks like this is a question which can be asked on a support channel. Please only use this issue tracker for reporting bugs with the library itself. If you have a question on how to use functionality provided by this repo you can try one of the following channels:

Laracasts Forums
Laravel.io Forums
StackOverflow
Discord
Larachat
IRC

However, this issue will not be locked and everyone is still free to discuss solutions to your problem!
Thanks.

authors: driesvints nea


text:
big problem

i accidently run
composer dump-autoload --no-dev
then:
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
not recognize.
how i back :(((?

I think this is not issue for laravel. Just google solution.

Hi there,
Welcome to Laravel and we are glad to have you as part of the community.
Unfortunately this GitHub area is not a support area for general application issues. This is only for issues/bugs with the framework code itself.
I will be closing your ticket here. Instead please try asking your question on one of the many great community support areas that will likely give you a better answer more quickly:

Laravel Slack (https://larachat.co/)
Laravel.io Forum (https://laravel.io/forum)
Laracasts Forum (https://laracasts.com/discuss)
StackOverflow (http://stackoverflow.com/questions/tagged/laravel)

If you feel I've closed this issue in error, please provide more information about how this is a framework issue, and I'll reopen the ticket.
Thanks in advance.

authors: Miljan9602 bestheroforever laurencei


text:
Laravel MIME issue while validating .csv file

Laravel Version: 6.x
PHP Version: 7.2

Description: CSV file MIme Type is not validated
Steps To Reproduce:
$request->validate([
  'fileinput' => ['required','file','mimetypes:text/csv']
]);

Upload a csv file
fails validation even if Content-Type: text/csv
is set in request
Response
{
    "message": "The given data was invalid.",
    "errors": {
        "fileinput": [
            "The fileinput must be a file of type: text/csv."
        ]
    }
}

Also,
$request->file('fileinput')->getClientMimeType()

gives text/csv

Hi there,
Thanks for reporting but it looks like this is a question which can be asked on a support channel. Please only use this issue tracker for reporting bugs with the library itself. If you have a question on how to use functionality provided by this repo you can try one of the following channels:

Laracasts Forums
Laravel.io Forums
StackOverflow
Discord
Larachat
IRC

However, this issue will not be locked and everyone is still free to discuss solutions to your problem!
Thanks.

@driesvints After running into this as well, it's not a question for support, it's an actual bug in even Laravel 7.27. When uploading a csv file, the resulting UploadedFile instance is populated with:
Illuminate\Http\UploadedFile^ {#3437
  -test: false
  -originalName: "test.csv"
  -mimeType: "text/csv"
  -error: 0
  #hashName: null
  path: "/tmp"
  filename: "phpRejfeQ"
  basename: "phpRejfeQ"
  pathname: "/tmp/phpRejfeQ"
  extension: ""
  realPath: "/tmp/phpRejfeQ"
  aTime: 2020-09-03 15:13:26
  mTime: 2020-09-03 15:13:26
  cTime: 2020-09-03 15:13:26
  inode: 1835052
  size: 599489
  perms: 0100600
  owner: 1006
  group: 1006
  type: "file"
  writable: true
  readable: true
  executable: false
  file: true
  dir: false
  link: false
}

The resulting code check to validate the mime type ends up detecting this file as txt for the call to guessExtension in the mime validation method, https://github.com/laravel/framework/blob/7.x/src/Illuminate/Validation/Concerns/ValidatesAttributes.php#L1209, which then ends up with a validation error of The file must be a file of type: csv.
This is likely due to reading the filename/extension of the UploadedFile rather than the mimeType of the upload or even the original file. I'm not sure why this issue was closed so quickly seemingly without any actual investigation to determine if this was a valid issue or not.

In further testing, this is even more widespread as it also affects the store method when saving uploaded files. This causes the stored file to get an extension of txt rather than the correct csv.

@ragingdave we're using the mime component from Symfony for this so please report this there. There's nothing we can do about it.
https://github.com/laravel/framework/blob/c6cf38139d2524a7c3accb606e3fb1b035c98d6a/src/Illuminate/Filesystem/Filesystem.php#L11

authors: driesvints ragingdave zavre-c


text:
Str::slug no support for Arabic, Farsi, .. languages

There is no support for Arabic, Farsi, .. languages in Str::slug , I hope it will be in the next updates.
Is there any package for this ?
Thanks

I speak Persian and I created this in my helpers file. You can do the same.
function make_slug($string = null, $separator = '-')
{
	if (is_null($string)) {
		return '';
	}

	$string = trim($string);
	$string = mb_strtolower($string, 'UTF-8');

	// Make alphanumeric (removes all other characters)
	// this makes the string safe especially when used as a part of a URL
	// this keeps latin characters and arabic charactrs as well
	$string = preg_replace("/[^a-z0-9_\s-ءاآؤئبپتثجچحخدذرزژسشصضطظعغفقكگلمنوی]/u", '', $string);

	// Remove multiple dashes or whitespaces
	$string = preg_replace("/[\s-]+/", ' ', $string);

	// Convert whitespaces and underscore to the given separator
	$string = preg_replace("/[\s_]/", $separator, $string);

	return $string;
}

Dear Hassan,
You can use this repository to generate slug for Persian words. I have trained that model. Please let me know if you need more information.
https://github.com/tihu-nlp/g2p-seq2seq-tihudict

@hassanazimi  where should i add this code in laravel??

@OmarGarhy In your global helpers.

@safir187 Yes actually this is the correct version:
function make_slug($string, $separator = '-')
{
	$string = trim($string);
	$string = mb_strtolower($string, 'UTF-8');
	$string = preg_replace("/[^a-z0-9_\s-ءاآؤئبپتثجچحخدذرزژسشصضطظعغفقكکگلمنوهی]/u", '', $string);
	$string = preg_replace("/[\s-_]+/", ' ', $string);
	$string = preg_replace("/[\s_]/", $separator, $string);

	return $string;
}

this function not work in php 7.3  because  PCRE engine migrates to PCRE2 and  i updated your function for php =>7.3:
function make_slug($string, $separator = '-')
    {
        $string = trim($string);
        $string = mb_strtolower($string, 'UTF-8');
        $string = preg_replace("/[^a-z0-9_\-\sءاآؤئبپتثجچحخدذرزژسشصضطظعغفقكکگلمنوهی]/u", '', $string);
        $string = preg_replace("/[\s\-_]+/", ' ', $string);
        $string = preg_replace("/[\s_]/", $separator, $string);

        return $string;
    }

@OmarGarhy In your global helpers. (already mentioned)

I speak Persian and I created this in my helpers file. You can do the same.

How about extending laravel Str::slug function using macros? that sounds

@hassanazimi where should i add this code in laravel??

You can write you own helper, but a better solution to me is extending laravel Str using macros.

@hassanazimi where should i add this code in laravel??

You can write you own helper, but a better solution to me is extending laravel Str using macros.

authors: MohammadNajjary OmarGarhy b00f behzadev hassanazimi nlemsieh


text:
Illuminate\Http\Request and helper request() can have different values

Laravel Version
10.14.1
PHP Version
8.2.3
Database Driver & Version
No response
Description
Good afternoon. It is correct that Illuminate\Http\Request and helper request() may be different.
Simple example:
    $request->request->set('asd', 'test');

    var_dump($request->get('asd')); // return test

    dd(request()->get('asd')); // return null

Shouldn't they be identical?
Steps To Reproduce
$request->request->set('asd', 'test');   dd(request()->get('asd')); // return null

@Samoylenko666 I have tested but its returns "test" for both output.
Laravel Version
10.14.1
PHP Version
8.2.7


text:
Weird behavior of ->value() on Eloquent Model

Laravel Version
11.9
PHP Version
8.3
Database Driver & Version
MySQL 8.0
Description
Calling value() on Eloquent Model causes a DB query . For example:
        $user = User::find(250);
        $b = $user->value('id');
        dd($b);

The $b value unexpectedly will be 1 instead of 250 as a result of the following query:
select idfromusers limit 1
Steps To Reproduce
Run the below example code:
$user = User::find(250);
        $b = $user->value('id');
        dd($b);

Hi there,
Thanks for reporting the problem you are encountering, but it looks like this is a question which may be better suited for a support channel. We only use this issue tracker for reporting bugs with the library itself. If you have a question on how to use functionality provided by this repository you can try one of the following channels:

Laracasts Forums
Laravel.io Forums
StackOverflow
Discord
Larachat
IRC

However, this issue will not be locked and everyone is still free to discuss solutions to your problem!
Thanks.

authors: ISNewton crynobone


text:
[Bug?] Cashier 4.0 - new API last_four remains null

If I create a new subscription using the new Cashier 4.0 Stripe API - the last_four column remains null?
Am I supposed to be doing anything different to have that column filled when creating a new subscription?

This has been fixed in cashier 4.0.1


text:
[5.3] Include delayed and reserved in redis queue count

This makes it consistent with all the other drivers. This is not the nicest implementation though. There's probably a way to do it using those "scripts"... Ping @halaei. :)

This PR was not ready for merge and contained broken cs changes in it. I'm reverting and have disabled auto PR merging on StyleCI until I deploy a fix in a few moments,

StyleCI has been fixed now.
I will cherry-pick in the good commit from here.


text:
[5.3] Add support for Gammu SMS Api

Added support for Gammu SMS Api. Tested it with latest Laravel 5.3 rc1.

Thanks, but I don't think we're accepting new drivers here.

Why? Its good one to have it. Someone would like to use their own gammu sms system with Laravel, so we could allow it.

Yeh, but someone would like to use 100 other things too if you see what I mean.

Yes I see.

Ok changed it to get key and url from config.

@kristiandrucker you can submit your channel to this GitHub Organisation if you want:
https://github.com/laravel-notification-channels
We created it to house all custom channels that aren't built-in.

@themsaid Thanks I will look into it.

Yes, please use the community project to add more drivers.

authors: GrahamCampbell kristiandrucker taylorotwell themsaid


text:
Log e-mail body

Add e-mail body to LOG.

We don't generally make changes to 4.2 unless they are bug fixes.

authors: juniorrosul taylorotwell


text:
[5.4] Adding support to collection on Eloquent::find

Most of eloquent query methods accepts array or Arrayable, and recently this changed on version 5.4... I'm upgrading a app from 5.2 and it used to work.
This fixed my problem, now:
Model::find(collect([1, 2]));

Works as expected.

Just a note that this "breaks" previous behavior. Granted, this would have probably only happened by mistake. But I don't think the new behavior is intuitive either.
$user1 = User::find(1);
$user2 = User::find($user1);

Old
$user2 == $user1. They are both Eloquent models with the same ID
New
$user2 is now a Collection containing a single model with the same ID as $user1

What would be the point in that snippet of code, @andrewtweber ?

Granted, this would have probably only happened by mistake.

As I said.
My point is that this can change the output of probably the most frequently used method in Eloquent. Just thought people should know.

authors: andrewtweber dbpolito joshmanders


text:
[5.5] Add the power of Arr::get() to Collection get()

By using Arr::get(), now It's possible to get nested value using collection get().

and tests …

@Dylan-DPC Thanks..

Are we really really sure that we can just add new wildcard capabilities to such a globally used class like Collection without causing problems for people? Are we really sure that no one use ::get($key) with keys that already looks like wildcards?

Arr::get() first checks if the full key exists in the array before trying to access sub-arrays using the dot notation. It also doesn't do wildcards.

authors: 36864 Dylan-DPC nmfzone sisve


text:
Database Schema Blueprint: Nullable Morphs After

This is the first PR that I've ever submitted - please forgive errors or mistakes...
Description
Add Nullable Morphs After function to Database Schema Blueprint. I have tested this function but I'm unsure if you require unit tests?
End User Benefits
Recently I've had to create nullable morphs after a particular column in a production database. I think that writing something like this in the migrations files...
    public function up()
    {
        Schema::table('testing', function (Blueprint $table) {
            $table->nullableMorphsAfter('tested', 'name');
        });
    }

    public function down()
    {
        Schema::table('testing', function (Blueprint $table) {
          $table->dropMorphs('tested');
        });
    }

Seems like a cleaner way to achieve nullable morphs columns after specified column. This is much easier for the end user to understand rather than the current working method...
  public function up()
  {
    Schema::table('user_goal', function (Blueprint $table) {
      $table->string('assigned_type')->after('goal_id')->nullable();
      $table->unsignedBigInteger('assigned_id')->after('goal_id')->nullable();

      $table->index(['assigned_id', 'assigned_type'], 'user_goal_assigned_type_assigned_id_index');
    });
  }

  public function down()
  {
    Schema::table('user_goal', function (Blueprint $table) {
      $table->dropMorphs('assigned');
    });
  }

After testing this with existing functionality I am unable to find any conflicts...

Seems like something went wrong with branching here. Can you try to branch off from master and try again? Also make sure you fix the StyleCI warnings.

authors: driesvints ijeffro


text:
5.8.29 tagged today breaks queue deserializing with Model::newCollection()

This change pull request #29196 breaks queued jobs using SerializesModels that expect a custom collection. The above changes return an EloquentCollection when unserialized regardless of the model overriding newCollection.
Example:
<?php

namespace App\Jobs;

use App\Models\Collections\PostsCollection;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;

class DoSomethingToPosts extends Job implements ShouldQueue
{
    use InteractsWithQueue, SerializesModels;

    public $posts;

    public function __construct(PostsCollection $posts)
    {
        $this->posts = $posts;
    }

    public function handle()
    {
        // This object is now \Illuminate\Database\Eloquent\Collection,
        // not a PostsCollection instance.
        $this->posts;
    }
}

Thanks @derekmd for the tips on this PR

Why aren’t we filtering the original collection instead? :thinking:


text:
[6.x] Improvements on subqueries

Determine if the value is queryable
This method allows the query builder to check if a value is queryable and can be used to perform subqueries.
Those checks were performed in 4 different places in the query builder so the repetition is now extracted to a single method.
Add more context about invalid subqueries
The valid values for performing subqueries are query builder instances, closures and strings.
If the value is not one of the above, an InvalidArgumentException was thrown without any message. I've added a sensible message, and also some @throws docblock tags to the affected methods.
I've also added some tests that confirm these methods can indeed throw exceptions when misused.

@driesvints I've removed the @throws docblock tags.


text:
[6.x] Full PHP 8.0 Support

Draft until most libraries have started to release PHP 8 compatible versions or at least dev builds.
Todo/Requirements:

[x] tijsverkoyen/css-to-inline-styles: https://github.com/tijsverkoyen/CssToInlineStyles/pull/198
[x] opis/closure: https://github.com/opis/closure/pull/67, https://github.com/opis/closure/pull/81
[x] guzzlehttp/guzzle: https://github.com/guzzle/guzzle/issues/2702, https://github.com/guzzle/guzzle/pull/2808
[x] AWS SDK: https://github.com/aws/aws-sdk-php/pull/2079
[x] mockery/mockery (https://github.com/mockery/mockery/pull/1072, https://github.com/mockery/mockery/pull/1088)
[x] PHPUnit 9.3 release (will be released on 2020-08-07)
[ ] doctrine/dbal ^3.0 or ^2.12 release (https://github.com/doctrine/dbal/pull/4347)
[x] phpdocumentor/reflection-docblock ^5.2 release
[x] Flysystem 1.1 release (https://github.com/thephpleague/mime-type-detection/pull/1, https://github.com/thephpleague/flysystem/pull/1183)
[x] Re-enable fast-finish
[x] Prophecy PHP 8 support
[x] Whoops PHP 8 support (https://github.com/filp/whoops/pull/672)
[x] Cron expression PHP 8 support (https://github.com/dragonmantank/cron-expression/issues/94)
[x] Revert extra build steps
[ ] Faker PHP 8 support (https://github.com/fzaninotto/Faker/pull/2063)
[ ] Testbench PHP 8 support
[x] Resolve sort issues

I have started the work on opis/closure here: https://github.com/opis/closure/pull/67

Remove phpdocumentor/reflection-docblock from build

I think this will cause prefer-lowest to fail.

@GrahamCampbell doesn't seems so.

PHP 8 broke some more stuff, so Mockery is no longer working. https://github.com/mockery/mockery/pull/1088 fixes that.

I added php-8 branch on orchestra/testbench-core

For what it's worth, it would have been really nice to land this PR incrementally. It's okay to have partial PHP 8 support in master with an allow-failures build. It allows other people to start testing.

@nikic I think the issue would be that there's no 'master' branch for version 6.x and the intention has always been to merge things upwards. This will lend on 6.x and 6.x will be merged into 8.x and master. Merging this on master would make the branches out of sync and harder to resync as we can't merge master (9.x) back into 6.x

@deleugpn Sorry for being imprecise there. By "master" I just meant "landed upstream", not necessarily only on the master branch. If PHP 8 will be supported on older versions as well, it would of course make sense to land it on lower branches and merge upwards.
For example, Symfony has been landing incremental fixes for PHP 8 support for something like half a year already, across many supported branches, rather than waiting to merge "full support" at once.

@nikic definitely something we can consider. However, I think I'm missing something as I don't see any PHP 8 builds on the https://github.com/symfony/symfony repository?

@driesvints It looks like the PHP 8 build is on Travis (nightly): https://travis-ci.org/github/symfony/symfony/builds/736971898

@nikic we've just partially merged this PR and are working on getting the upstream branches up to date. Releases are done tomorrow. Thanks!

https://github.com/doctrine/dbal/releases/tag/2.11.2 🚀

@driesvints Looks like doctrine/dbal#4347 has been merged. Just fzaninotto/Faker#2063 now but it appears that the main dev for that isn't very active with that package.

@ollieread we've contacted the maintainer to move the project to a joint organisation so we can help maintain it. Waiting for a reply now.

Excellent @driesvints , same as I said on the faker pr, should that be required id be happy to help contribute/maintain if there's need.

Putting this in draft again for a bit longer to see if Faker lands PHP 8 support soon.

Looks like a fork of Faker is going to have to be made (see https://github.com/fzaninotto/Faker/pull/2063#issuecomment-717118799).

@bramceulemans we saw that and already making plans on how to proceed. Stay tuned.

@driesvints I think we need to update the Faker PR to https://github.com/FakerPHP/Faker/pull/1

This is huge! Congratulations to the Laravel Team!

@deleugpn thanks for your work on this as well 👍

authors: GrahamCampbell bramceulemans crynobone deleugpn driesvints fridzema nikic ollieread viezel


text:
Update DatabaseRule.php

What does this fix?

Class names are defined only with backslashes. Forward slashes are incorrect.

'App/Models/Users'

App\Models\Users::class

Only the bottom one is allowed input. The first example you give is not supported.


text:
[9.x] Allow custom PathNormalizer for filesystem

Currently all filesystems use the default WhitespacePathNormalizer provided by thephpleague/flysystem.
While this is mostly fine, it throws an exception for "funky" whitespaces.
Currently there is no general solution to alter this behavior to e.g. just remove this funky whitespaces.
This PR allows a custom PathNormalizer class to be defined in filesystems config.
The documentation for the new configuration option in the laravel/laravel repo could look something like:
/*
|--------------------------------------------------------------------------
| Path Normalization
|--------------------------------------------------------------------------
|
| Here you may specify a custom path normalizer. It has to implement
| `\Illuminate\Contracts\Filesystem\PathNormalizer`.
|
*/

'path_normalizer' => null,

Here an example for a custom PathNormalizer that alters this behavior:
<?php

namespace App\Filesystem;

use Illuminate\Contracts\Filesystem\PathNormalizer as PathNormalizerContract;
use League\Flysystem\WhitespacePathNormalizer;

class PathNormalizer extends WhitespacePathNormalizer implements PathNormalizerContract
{
    public function normalizePath(string $path): string
    {
        // Remove funky whitespaces.
        $path = preg_replace('#\p{C}+#u', '', $path);

        return parent::normalizePath($path);
    }
}

This exact behavior was also recently changed in Spaties popular spatie/laravel-medialibrary package:
https://github.com/spatie/laravel-medialibrary/pull/3105
Fixes #44244.

Instead of us needing to add new interfaces and configuration options, could you just normalize the whitespace yourself before calling the file storage methods?


text:
[9.x] Improve JsonResource::class values

This PR improves the value of the JsonResource::class.
Example:
Resource:
return JsonResource::make([
  'array' => [1, 2, 3],
  'object' => (object) ['a' => 'b'],
  'arrayable' => $arrayableObject,
  'htmlString' => $htmlStringObject,
  'stringable' => $stringableObject,
]);

Before

After

Thanks.

This introduces a problem; because filtering happens before serialization Arrayable and Stringable will now take precedence over JsonSerializable.
For example:
class Foo implements Arrayable, JsonSerializable
{
    public function toArray()
    {
        return ['bar'];
    }

    public function jsonSerialize()
    {
        return ['baz'];
    }
}

Before:
["baz"]

After:
["bar"]

This could be fixed by also including JsonSerializable and Jsonable in the filter method, but personally I think only jsonserializable data should be returned by a resource. If you want an arrayable object to be represented as an array, either make it jsonserializable or call toArray() on it manually.

This can be a breaking change for many.

Yes @axlon, you're right. I wait for @taylorotwell's opinion.

Extra issue, when I add casting HtmlString::class instance to a property of Model. It's still empty {} when encoding. I think it causes by json_encode in Model don't know a property is stringable.

Thanks for your pull request to Laravel!
Unfortunately, I'm going to delay merging this code for now. To preserve our ability to adequately maintain the framework, we need to be very careful regarding the amount of code we include.
If possible, please consider releasing your code as a package so that the community can still take advantage of your contributions!
If you feel absolutely certain that this code corrects a bug in the framework, please "@" mention me in a follow-up comment with further explanation so that GitHub will send me a notification of your response.

authors: ankurk91 axlon dinhquochan taylorotwell


text:
[10.x] Added alias for eloquent model attributes

With this PR you can now specify alias for attributes of a model instance when retrieving them via only method.
Current approach:
$post = Post::query()->first();

return [
    'value' => $post->id,
    'title' => $post->title,
];

New approach:
$post = Post::query()->first();

return $post->only([
    'id as value',
    'title',
]);

Why not do this at the database level?

This technically works so it might be worth checking if the value exists before treating it as an alias.
$post = Post::first(DB::raw('id as "id as value"'));

$post->getAttribute('id as value');
$post->{'id as value'};

Thanks for your pull request to Laravel!
Unfortunately, I'm going to delay merging this code for now. To preserve our ability to adequately maintain the framework, we need to be very careful regarding the amount of code we include.
If possible, please consider releasing your code as a package so that the community can still take advantage of your contributions!
If you feel absolutely certain that this code corrects a bug in the framework, please "@" mention me in a follow-up comment with further explanation so that GitHub will send me a notification of your response.

authors: bryanlopezinc rojtjo saeidasadi taylorotwell


text:
Wrong param type: string to array

src\Illuminate\Foundation\helpers.php
Gave me errors.

Test are failings

Yeah, sorry.
I kept re-running hope for better, but it's not working.
Closed now.

authors: PiousSutherland crynobone


text:
[10.x] Migrate to laravel/facade-documenter repository

Thanks!

authors: driesvints timacdonald

repo: laravel/pennant


text:
Starting in secure mode even if certificate is not specified

Reverb Version
1.0.0-beta6
Laravel Version
11
PHP Version
8.2
Description
Am I understanding correctly, that if the certificate is not specified then it tries to grab it itself from "hostname"?
My app is behind a reverse proxy, that means the connection between proxy and app is not encrypted.
The websocket server is started in secure mode with wrong certificate.
    location /websocket {
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $http_host;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
        proxy_pass http:/app:8080/;
    }

src/Servers/Reverb/Factory.php 114
    protected static function configureTls(array $context, ?string $hostname): array
    {
        $context = array_filter($context, fn ($value) => $value !== null);

        $usesTls = ($context['local_cert'] ?? false) || ($context['local_pk'] ?? false);

        if (! $usesTls && $hostname && Certificate::exists($hostname)) {
            [$certificate, $key] = Certificate::resolve($hostname);

            $context['local_cert'] = $certificate;
            $context['local_pk'] = $key;
        }

        return $context;
    }

You can close this issue if the first question is false.
Steps To Reproduce
.

Reverb will try to grab the certificate from the Valet or Herd paths using the REVERB_HOST value, but only if you are not manually specifying your own certifcate.

That was fixed here: https://github.com/laravel/reverb/pull/85
Are you on the latest version?

Can you do some logging in here and see where the certificate is being found?
https://github.com/laravel/reverb/blob/bf6b6f85cdc3fff360761dac9f854c27ffc792fe/src/Servers/Reverb/Factory.php#L114-L128

Thanks @vatsake
Can you give this PR a try? https://github.com/laravel/reverb/pull/158

Great minds think alike! Just pushed a fix

authors: joedixon vatsake

repo: laravel/reverb


text:
Running using colima

Sail Version: ^1.0.1
Laravel Version: 9.44.0
PHP Version: 8.2.0
Host operating system: macOS

Description:
When using colima  to install sail this error appears:
[+] Running 0/0
 ⠋ meilisearch Pulling                                                                                0.0s
 ⠋ pgsql Pulling                                                                                0.0s
 ⠋ redis Pulling                                                                                0.0s
error getting credentials - err: docker-credential-osxkeychain resolves to executable in current directory (./docker-credential-osxkeychain), out: ``
[+] Building 0.7s (3/3) FINISHED
 => [internal] load build definition from Dockerfile                                                                                0.1s
 => => transferring dockerfile: 69B                                                                                0.0s
 => [internal] load .dockerignore                                                                                0.1s
 => => transferring context: 2B                                                                                0.0s
 => ERROR [internal] load metadata for docker.io/library/ubuntu:22.04                                                                                0.5s
------
 > [internal] load metadata for docker.io/library/ubuntu:22.04:
------
failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to create LLB definition: rpc error: code = Unknown desc = error getting credentials - err: docker-credential-osxkeychain resolves to executable in current directory (./docker-credential-osxkeychain), out: `

Steps To Reproduce:

Install colima
Install Docker
Start a new application with composer create-project laravel/laravel myapp
Run install command php artisan sail:install

Hi there,
Thanks for reporting but it looks like this is a question which can be asked on a support channel. Please only use this issue tracker for reporting bugs with the library itself. If you have a question on how to use functionality provided by this repo you can try one of the following channels:

Laracasts Forums
Laravel.io Forums
StackOverflow
Discord
Larachat
IRC

However, this issue will not be locked and everyone is still free to discuss solutions to your problem!
Thanks.

authors: driesvints rafa-acioly

repo: laravel/sail


text:
Enum where no annotation should be generated (because it is a Union-Type)

URL Hash
#/sklearn/sklearn.metrics._classification/f1_score/average
Actual Annotation Type
@enum
Actual Annotation Inputs
{'micro', 'macro', 'samples', 'weighted', 'binary'} or None, default='binary'
Expected Annotation Type
No annotation
Expected Annotation Inputs
n/a
Suggested Solution (optional)
No response
Additional Context (optional)
No response

Duplicate of https://github.com/lars-reimann/api-editor/issues/762.

authors: lars-reimann lukarade

repo: lars-reimann/api-editor


text:
Failure needs to be idempotent

While debugging OSX support, I can into several situations where the build was expecting a working directory I wasn't currently using:
CDPATH="${ZSH_VERSION+.}:" && cd /src/ext/ffi_c/libffi && /bin/bash /src/ext/ffi_c/libffi/missing --run autoconf
/usr/local/rvm/scripts/extras/bash_zsh_support/chpwd/function.sh: line 5: cd: /src/ext/ffi_c/libffi: No such file or directory
 cd /src/ext/ffi_c/libffi && /bin/bash /src/ext/ffi_c/libffi/missing --run automake-1.11 --foreign Makefile
/usr/local/rvm/scripts/extras/bash_zsh_support/chpwd/function.sh: line 5: cd: /src/ext/ffi_c/libffi: No such file or directory
make[1]: *** [/src/ext/ffi_c/libffi/configure] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [/src/ext/ffi_c/libffi/Makefile.in] Error 1
make[1]: Leaving directory `/Users/eroot/repos/ffi/build/i386-mingw32/ffi_c/1.8.7/libffi-i386-mingw32'
make: *** ["/Users/eroot/repos/ffi/build/i386-mingw32/ffi_c/1.8.7/libffi-i386-mingw32"/.libs/libffi_convenience.a] Error 2
rake aborted!
Command failed with status (2): [nice make -j`nproc`...]
/usr/local/rvm/gems/ruby-2.2.2/gems/rake-compiler-0.9.5/lib/rake/extensiontask.rb:155:in `block (2 levels) in define_compile_tasks'
/usr/local/rvm/gems/ruby-2.2.2/gems/rake-compiler-0.9.5/lib/rake/extensiontask.rb:154:in `block in define_compile_tasks'
Tasks: TOP => native => native:i386-mingw32 => native:ffi:i386-mingw32 => build/i386-mingw32/stage/lib/1.8/ffi_c.so => copy:ffi_c:i386-mingw32:1.8.7 => build/i386-mingw32/ffi_c/1.8.7/ffi_c.so
(See full trace by running task with --trace)

I also noticed the build leaving a bunch of junk (bin/ and .bundle) in the source directory.
The build process needs to detect failures and clean up. A separate working directory should be used as well.

rake-compiler-dock itself should be idempotent. It does not do any changes to the build directory and all changes to the image/container are local to the running session only. So IMHO this is an issue of the given project which uses rake-compiler-dock or possibly an issue of rake-compiler.

I also noticed the build leaving a bunch of junk (bin/ and .bundle) in the source directory.

This is interesting and it is not intended. Could it be, that it was a result of the wrong UID before your change in commit https://github.com/larskanis/rake-compiler-dock/commit/641d47963 ?

I was able to narrow this down some more. This particular error occurs when you change working directories in the docker call after creating the container. I think I may have found a way to clear out this config from the machine but I forget currently. I'll play with it some to narrow that down again.

Also happening for me, the .bundle/config was modified in my working directory after the docker run completed. Confusion ensued as I tried to figure out why Bundler was telling me my development gems were no longer installed :confused: I am on OS X 10.10.4.

authors: larskanis sodabrew tduehr

repo: larskanis/rake-compiler-dock

license: mit

license_source: bigquery


text:
Autocomplete username in comments

When a user starts typing an @, it would be nice if it started autocompleting usernames (a la GitHub), in order to make the functionality in #372 more useful.

+1. The way I've done this in the past is via ElasticSearch. Any alternatives or does this require adding a new backend service?

We have so few users, we could probably just keep the entire userlist in memory and search it. :)

touché

authors: megamattron rickhanlonii treygriffith

repo: larvalabs/pullup


text:
Can't be built with MinGW

From https://github.com/conan-io/conan/issues/215
Unfortunately compiling OpenSSL with MinGW is very non-trivial and involves using MSYS - I don't think the changes for this are going to be trivial.
I personally can live without MinGW support, so consider this a low-priority issue for now.

+1 now on windows 10 with

It seems to be the first time you run conan
Auto detecting your dev setup to initialize conan.conf
Found gcc 5.1
Default conan.conf settings
        os=Windows
        arch=x86_64
        compiler=gcc
        compiler.version=5.1
        compiler.libcxx=libstdc++
        build_type=Release
*** You can change them in ~/.conan/conan.conf ***
*** Or override with -s compiler='other' -s ...s***

It is important to fix this because it comes from the [Conan official demo] for beginers.(http://docs.conan.io/en/latest/getting_started.html)

I too have this issue on Win10 with MinGW-W64 5.3.0. I followed the getting started (http://docs.conan.io/en/latest/getting_started.html) but ended up with:
`PS C:\Users\Kuxe\programming\cpp\mytimer\build> conan install .. --build missing
Requirements
OpenSSL/1.0.2h@lasote/stable from conan.io
Poco/1.7.3@lasote/stable from conan.io
zlib/1.2.8@lasote/stable from conan.io
Packages
OpenSSL/1.0.2h@lasote/stable:c55b5bfe2b1ae23db6b3b5951282ccd2cb689f81
Poco/1.7.3@lasote/stable:edb959e2612d0bf0be8bd10e01a131c7a195f54e
zlib/1.2.8@lasote/stable:cd3e418e619287a431ed81161646f9073dcb193e
ERROR: Poco/1.7.3@lasote/stable: Error in package_info() method, line 177
if self.settings.compiler.runtime == "MT" or self.settings.compiler.runtime == "MTd":
'settings.compiler.runtime' doesn't exist for 'gcc'
'settings.compiler' possible configurations are ['exception', 'libcxx', 'threads', 'version']
PS C:\Users\Kuxe\programming\cpp\mytimer\build>`

@Kuxe It's a Poco package issue, the recipe is supposing the windows users are using Visual Studio. Please open an issue there https://github.com/lasote/conan-poco I'll try to take look to it.

I've uploaded a new OpenSSL recipe trying to compile with MinGW but it fails.
Conan don't make miracles (yet hahah) I need to know how to compile OpenSSL with MinGW to be able to write a recipe.
Was Someone able to compile OpenSSL with MinGW? If true please, give me some tips. I putted the msys tools in the path and invoked:
def mingw_make(config_options_string):
        # NOT WORKING, PLEASE, ANY HELP WOULD BE GREAT.
        # WITH THE MSYS TOOLS IN THE PATH IT RUNS MAKE BUT IT FAILS
        suffix = "64" if self.settings.arch == "x86_64" else ""
        command = "perl Configure mingw%s %s" % (suffix, config_options_string)
        run_in_src(command, show_output=True)
        self.output.warn("----------MAKE OPENSSL %s-------------" % self.version)
        run_in_src("make", show_output=True)

It fails:
buildinf.h:15:9: error: missing terminating ' character
         '5','8','8','a','5','3','b','b','7','0','4','\','b','i','n','\','g','c',
         ^

The recipe of OpenSSL/1.0.2i will try to compile it following the above procedure: https://www.conan.io/source/OpenSSL/1.0.2i/lasote/stable

@Kuxe I'm generating Poco 1.7.5 packages solving the error you found, but now it crashes in the OpenSSL compilation... :( Help needed!

Any progress on the issue?
Is there any way to compile "Hello world" on windows with MinGW by now?

Hi @rcmonitor
We have released some improvements to use MinGW with autotools in windows, you can read more here: http://docs.conan.io/en/latest/howtos/migrate_to_new_environment_management.html#building-autotools-projects-in-windows-with-mingw
A hello world can be easily compiled in Windows with MinGW, just use -s compiler=gcc and put MinGW in the path. I also recommend you to read this blog post I wrote: http://blog.conan.io/2016/12/22/Building-multi-compiler-C_and_C++-applications-with-conan.html
I'll try again to build OpenSSL with MinGW but the compile issue doesn't seem to be related with conan but with OpenSSL build system.

Hi all, I've made some progress!
I've opened a PR #21 that supports MinGW. It requires a MSYS64 installed and conan >= 0.20.0.
If you want to try it, clone the repo, checkout to testing/1.0.2j and export the recipe to your local cache with:
conan export user/channel
Feedback is welcomed.

Hey everyone,
I've been tryin to compile libcurl myself so needed openssl also
setting OpenSSL:no_asm=True seems to matter :)

Been trying to test the #21 build. When I build with msys and mingw64 in path cmake complains that "sh" from msys is in the path. When I build with just mingw64 in the path, much later conan fails when it tries to call run_in_windows_bash which finds no bash in the path.
Am I missing something here; it seems like there are mutually exclusive build requirements?

@lachlankrautz I've solved that problem with conan 0.21.0 but is not released yet. If you can try it from sources use the develop branch.

I was able to build mingw OpenSSL using mingw on windows 10 but I needed to change conan's "run_in_windows_bash" to use a full path to msys2's bash.

If you have msys2/usr/bin in path then all mingw-cmake commands will fail as they abort if they detect sh in the path
If you have activated windows feature "Windows Subsystem for Linux" then windows subsystem bash will be in the path and msys paths won't work (cd "build folder" directory not found)
If msys2/usr/bin is not in the path cmake builds will work but auto tools builds wont

I think conan needs to search out the correct bash path ("c:/msys2/usr/bin/bash" in my case) and call bash using full path for "run_in_windows_bash" feature.

@lachlankrautz Thanks for the feedback, you are right. With 0.21 I only solve the point 1) In case of 2) and 3) you need to specify where bash is. I'm opening an issue in conan repository with your comments.

@lachlankrautz Conan 0.22 has been released. Now you can adjust the environment variable CONAN_BASH_PATH or the conan.conf bash_path variable to change the default bash location.

Awesome, works great.

authors: Kuxe LB-- lachlankrautz lasote letsjustfixit qiukeren rcmonitor

repo: lasote/conan-openssl


text:
figure out more ergonomic approach for querying keys with value

the ergonomics of this got all messed up when we changed from a single bytes representation of a value to static data + encoded lengths + dynamic data
cc @smallbraingames

agreed
doesn't look good so makes me sad and leads to more stack too deep errors
example of ugliness

authors: holic smallbraingames

repo: latticexyz/mud


text:
refactor(world): delegation control extends System

DelegationControl does not inherit the System contract currently, despite being registered as a system.
This change allows us to make the parameter of WorldRegistrationSystem.registerSystem a System contract as opposed to a generic WorldContextConsumer.

related to #2092

authors: alvrs yonadaaa


text:
test(store-sync): benchmark storage adapters with 100, 1000, 10000 logs

Generate logs for 10000's of records on-the-fly is impractical so we run a script to generate the logs and save to file.
I really dislike the approach of separate bench files for each amount (this go approach is nice).
For 10000 logs, RECS is the fastest to hydrate but SQLite is fastest to fetch all records for a table:

Hooks (beforeAll etc.) are being added for Vitest benchmarks which will make our test setup better: https://github.com/vitest-dev/vitest/pull/5076


text:
Adjust 'dislike' presentation

We decided the negatives with the dislike symbols was too confusing. So we decided the dislikes will just be shown as positive numbers and that there will be a separate "social rejection score" that changes with each time they make a choice (still at the top right of the screen like before), but it will start over with each new chatroom.

Actually, Claire and I came up with something better. She will describe it to you in detail tomorrow. But we figured out in the like rooms we can start their social approval at 0% and slowly build it up, and in the dislike rooms we can start their social approval at 100% and have it slowly drop with each choice.

No more social disapproval anywhere. After each chatroom, he does want it to display the final score but only "Social Approval Score", regardless of which room they were in. In the "like" rooms, the Social Approval Score (which is back on the right sidebar) will begin at 0% (0/100 or 0/600) and build up as they gain likes (60/600 displays 10%, 120/600 displays 20%, etc). In the "dislike" rooms, the Social Approval Score will begin at 100% (100/100 or 600/600) and decrease as participants gain dislikes (eg. 60 dislikes will display 90% because they now have 540/600 likes, 120 dislikes will show 80%, etc).

Yes, and social approval score should still be at the top and large as in the last iteration.
Best,
Ryan

From: LavalleyCA @.>
Sent: Tuesday, July 26, 2022 11:43 AM
To: laureate-institute-for-brain-research/StimToolOnline @.>
Cc: Ryan Smith @.>; Author @.>
Subject: Re: [laureate-institute-for-brain-research/StimToolOnline] Adjust 'dislike' presentation (Issue #14)
[WARNING] This email originated outside of LIBR. Do not click on any links, open attachments, or respond with information unless you recognize the sender and know the content is safe.
No more social disapproval anywhere. After each chatroom, he does want it to display the final score but only "Social Approval Score", regardless of which room they were in. In the "like" rooms, the Social Approval Score (which is back on the right sidebar) will begin at 0% (0/100 or 0/600) and build up as they gain likes (60/600 displays 10%, 120/600 displays 20%, etc). In the "dislike" rooms, the Social Approval Score will begin at 100% (100/100 or 600/600) and decrease as participants gain dislikes (eg. 60 dislikes will display 90% because they now have 540/600 likes, 120 dislikes will show 80%, etc).
—
Reply to this email directly, view it on GitHubhttps://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Flaureate-institute-for-brain-research%2FStimToolOnline%2Fissues%2F14%23issuecomment-1195724142&data=05|01|rsmith%40laureateinstitute.org|10f7a930369941c56f1b08da6f2605e8|ff169993a2d34a4e8df384b2675b9050|0|0|637944506351120278|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000|||&sdata=TWYUBOYyRPS8Zh4zsI1W67vd0TQdYf0vmn8%2Ft4%2BHvG0%3D&reserved=0, or unsubscribehttps://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAL23RNHV3KT2SXOFVWCXGH3VWAIURANCNFSM54TJRHDQ&data=05|01|rsmith%40laureateinstitute.org|10f7a930369941c56f1b08da6f2605e8|ff169993a2d34a4e8df384b2675b9050|0|0|637944506351120278|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000|||&sdata=902q2ckBofjLFoU93yEio8ZGicjJOcrRXlxkRZlCxYs%3D&reserved=0.
You are receiving this because you authored the thread.Message ID: @.***>

Update the changes for this issue.
It's in production.

authors: LavalleyCA rssmith33 toujames


text:
Using go lint recommendations

Using go fmt command to format code according to golang recommendations.
Why?
Because, the most of editors could automatically format go files and add trash to commits.

IDEA In the future, use a pre-commit GitHub hook https://github.com/dnephin/pre-commit-golang

Thanks! Not merging this one, but essentially did the same thing. Was not aware of pre-commit.com - seems like a useful utility 👍

authors: joelibaceta lauripiispanen


text:
Install: Automatically Connect to Kubernetes

Description
Whether a user is running Meshery in or out of a cluster, it does not require users to configure connections to its adapters. Meshery is cognizant of its own adapters, able to establish connection and verify their status. In this same fashion, so should Meshery verify connectivity to Kubernetes as and when Meshery detects or is presented with (user uploads) a kubeconfig file.
Behavior

[ ] Users should be able to see Kubernetes connection status in the UI.
[ ] Users should be able to invoke an ad-hoc connectivity test with Kubernetes.

Implementation and Related Challenges

[ ]  Meshery should use a Kubernetes client to execute a kube-api info call.

Future

[ ] Users should be able to invoke an ad-hoc connectivity test with each connected Kubernetes cluster.

@anandrkskd, we are already using client-go Kubernetes library for working with Kubernetes config file. We need to create a method which will make a call to get the kubernetes version and/or nodes.
And then use this for 2 things: 1. in the addK8sConfig method in the k8sconfig handler file, around line 103, 2. create a new handler which will be used to do an adhoc test.

quick execution plan:

write a method which will get the nodes info
update code in all places to persist the node info as part of k8s config and ping (yet to be implemented), etc.
when running load test package this node info will be reobtained (just to ensure it is up to date) and bundled together along with the test results (not the metrics)

authors: girishranganathan leecalcote


text:
Add links to match the visual map

I'm...concerned about the level of interconnectivity because each of the links has a number that's gonna update on movement. We could relatively easily just erase a bunch of the connections? @lazerwalker mentioned you were seeing some sort of perf issue with the room links & updating too often, and after this MR the kitchen is a monster of a room, have 9 (!) connections.

Thanks for this!
I'm not sure we'll actually see a perf issue with the room links updating too often, but if we do, it won't be related to how many connections a specific room has.
tl;dr: React automatically re-renders a component when any of the pieces of data that serve as inputs to it (the props, or anything pulled in via a useContext) change. Now that we're pulling in all of roomData as a prerequisite of RoomView, instead of merely the data for the single room we care about, any time the global presence indicator changes we're re-rendering the RoomView.
My instinct is still to leave it as-is for now, and if people moving around a lot slows down rendering for everyone, then we kill the presence indicators in the links for every room.

authors: MoyTW lazerwalker

repo: lazerwalker/azure-mud


text:
Merge in tm0.34.2

Description
This PR reverts a few changes (that already landed on ll-core/master but haven't yet landed in 0.34.)x but keeps others.
In the face of https://github.com/lazyledger/cosmos-sdk/issues/2 we might reconsider and remove all changes that did (and won't land) in 0.34.x
Closes: #138

Now that we've figured out that a single dependency was causing most of the problems, and Evan already updated the cosmos-sdk fork using the current lazyledger-core, we can close and ignore this for now.

Now that we've figured out that a single dependency was causing most of the problems, and Evan already updated the cosmos-sdk fork using the current lazyledger-core, we can close and ignore this for now.

repo: lazyledger/lazyledger-core


text:
Make errorMessage of number input modal reactive to attribute changes

Overview
This PR ensures that the error message shown in the number input popup updates automatically if any node attributes change (such as the minimum and maximum value of the number variable). Currently it is not possible to update the min/max value through a UI when editing the variable, but this PR ensures the error message is updated when changing the html of the document manually.
connected issues and PRs:
Solves a large part of https://binnenland.atlassian.net/browse/GN-4395?atlOrigin=eyJpIjoiNjdhZGNkZmRjZGQ3NGY2ZWFkNmY5MzNlMjI5OGMzOWEiLCJwIjoiaiJ9
How to test/reproduce

Update the minimum or maximum value of a number variable through the customHTML modal and see how a possible error message appears (or disappears).

Checks PR readiness

[x] changelog
[x] npm lint
[x] no new deprecations

@lagartoverde tagging you in this to see if you think this is a good solution

Good change and fix! happy to see the weird bug was because of actual faulty code and not some weird hard-to-debug issue. Making the error message a getter is more sensible anyway here.
As far as I can tell the connected issue is also solved, except that the input number is not always reset (because localCopy does not change when min/max changes). You could maybe solve this with @trackedReset, however, it would reset when pressing "show as words" button too. Any other solution would be quite overkill for this issue.
In my opinion I'd say:
* good change, approved +1

* ticket can be closed (the important part is fixed)

  * that the "wrong" input number stays visible isn't a big deal and could be seen as a feature anyway. As long as the error message is correct (which you fixed here), I see no problem with it anymore.

I also tried it with the reset, but thought it would be confusing to the user when it resets the input when the toggle is clicked.

repo: lblod/ember-rdfa-editor-lblod-plugins


text:
fix reward error notification

Fixes #1555 @tzarebczan
This adds an option parameter to doClaimRewardType which it uses to fail silently.
doClaimEligiblePurchaseRewards (called by each doDownloadFile) uses this option when attempting to claim rewards.TYPE_MANY_DOWNLOADS and rewards.TYPE_FEATURED_DOWNLOAD
The error modal for rewards is in the <RewardLink> component and displayed when errorMessage is defined. It was getting set in redux and sitting there until a <RewardLink> is rendered when a user visits the rewards page. error is sent undefined in this PR because not calling the error reducer results in the two rewards pending on the rewards page.

Tested and it looks good now - no more error when going to the rewards page after streaming something.

I guess I'm not fully following the description of this. Why do we want this to fail silently? Shouldn't it just not fail?

@seanyesmunt some rewards that are checked automatically on all file starts ought to silently fail (e.g. we check for "many downloads" after every start until you've started enough).

authors: daovist kauffj seanyesmunt tzarebczan

repo: lbryio/lbry-app


text:
Sanitize urls with single quotation marks

PR Checklist
Please check all that apply to this PR using "x":

[x] I have checked that this PR is not a duplicate of an existing PR (open, closed or merged)
[ ] I have checked that this PR does not introduce a breaking change
[ ] This PR introduces breaking changes and I have provided a detailed explanation below

PR Type
What kind of change does this PR introduce?

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting)
[ ] Refactoring (no functional changes)
[ ] Documentation changes
[ ] Other - Please describe:

Fixes
Does not fix anything already in an issue.
However, it does fix behavior for thumbnails whose src URLs contain single quotes.
What is the current behavior?
Thumbnail images which have URLs containing ' are broken and do not show up.
An example is as follows:
The behavior for a thumbnail URL like https://sesamestrong.github.io/lbry-desktop/google's%20logo.png is that the thumbnail does not show up; the CSS rule changes from background-image: url('https://sesamestrong.github.io/lbry-desktop/google's%20logo.png') to background-image: url((unknown)); because there is an extra ' in the URL, which breaks CSS parsing.
What is the new behavior?
The new behavior is that the CSS rule for URLs with ' has every ' in the URL replaced with \', resulting in that the thumbnail shows up.
Other information
This PR does not contain any breaking changes; however, it is possible that problems similar to this one might show up in the future. In that case, it might be desirable to add a URL sanitization utility function somewhere in the project for reuse.

@Sesamestrong, thanks for the PR! Congrats on the first one here :)
Can we show you some appreciation for the contribution?
Also, we're giving away some Hacktoberfest bonuses and goodies for this month. We'll send you the information when you reach out to us.

Thanks for telling me about the benefits! How do I reach out for the Hacktoberfest bonuses?

Great fix!

authors: Sesamestrong seanyesmunt tzarebczan

repo: lbryio/lbry-desktop


text:
wallet send reverses utxo on failure but balance remains unchanged

The previous behavior would be that the balance disappeard, so users would know something was wrong and try to refresh. utxo release does work.
the ultimate fix is https://github.com/lbryio/lbry-sdk/issues/2465 and Lex's revamp uses blocking by default I believe.

This is now fixed

repo: lbryio/lbry-sdk


text:
Update shapeshift.md

Updated the pics with the new app design, also edited steps to convert and verify that LBC is received

@ceoger please fix the spelling error in the last screenshot per my Discord message.

authors: ceoger tzarebczan


text:
Odd issue on Debian.

When installing with APT, it works only with Lua 5.2, and Lua 5.3, but not Lua 5.1 and LuaJIT.
However, when installing with LuaRocks, then it works only with Lua 5.1, and LuaJIT, but not with Lua 5.2, and Lua 5.3.
The error is the same in both cases:
lua5.1: ./curses.lua:1: loop or previous error loading module 'curses'
stack traceback:
	[C]: in function 'require'
	./curses.lua:1: in main chunk
	[C]: in function 'require'
	curses.lua:1: in main chunk
	[C]: ?

This is Debian sid running on amd64 machine.
Note that LuaRocks, Lua 5.1, 5.2, 5.3 and LuaJIT (2.1.0, beta 3) were all installed by APT.

I'm having a similar issue on Armbian Buster.
root@odroidxu4:~# lua curses.lua
lua: ./curses.lua:1: loop or previous error loading module 'curses'
stack traceback:
	[C]: in function 'require'
	./curses.lua:1: in main chunk
	[C]: in function 'require'
	curses.lua:1: in main chunk
	[C]: ?
root@odroidxu4:~# luajit curses.lua
luajit: ./curses.lua:1: loop or previous error loading module 'curses'
stack traceback:
	[C]: in function 'require'
	./curses.lua:1: in main chunk
	[C]: in function 'require'
	curses.lua:1: in main chunk
	[C]: at 0x00459af1
root@odroidxu4:~# lua5.2 curses.lua
lua5.2: error loading module 'curses' from file './curses.lua':
	./curses.lua:20: too many C levels (limit is 200) in function at line 9 near 'a'
stack traceback:
	[C]: in ?
	[C]: in function 'require'
	./curses.lua:1: in main chunk
	[C]: in function 'require'
	./curses.lua:1: in main chunk
	[C]: in function 'require'
	./curses.lua:1: in main chunk
	[C]: in function 'require'
	./curses.lua:1: in main chunk
	[C]: in function 'require'
	...
	[C]: in function 'require'
	./curses.lua:1: in main chunk
	[C]: in function 'require'
	./curses.lua:1: in main chunk
	[C]: in function 'require'
	./curses.lua:1: in main chunk
	[C]: in function 'require'
	./curses.lua:1: in main chunk
	[C]: in function 'require'
	curses.lua:1: in main chunk
	[C]: in ?
root@odroidxu4:~# uname -a
Linux odroidxu4 4.14.195-odroidxu4 #3 SMP PREEMPT Tue Sep 1 11:57:21 CEST 2020 armv7l GNU/Linux

Not sure if this is still helpful... But you just need to rename the curses.lua file.
The example is very poorly named as it requires 'curses'.
Lua will first look in the files directory for a file named curses.lua and try to load that. Hence the error loop or previous error loading module 'curses'

authors: JoelEllis david-von-tamar wmoors

repo: lcurses/lcurses


text:
如何根据坐标进行定位

如题

直接修改leafer.zoomLayer.x

authors: jinyuxinjinyuxin leaferjs

repo: leaferjs/ui


text:
says ok, not ok, shame! shame! shame!

well, I've got the script running from
../Fix Spacechem.app/Contents/Resources
and it said everything was ok, it was not (details below)
then i tried the GUI from
../Fix Spacechem.app/Contents/MacOS
which had the exact same results
the current problem is that it starts, and then crushes with no error message (the best kind of bugs).
I can't believe i'll have to use a windows computer again 😫

Do you already have Mono 4.2.4 installed (at /Library/Frameworks/Mono.framework/Versions/4.2.4/)? My current suspicion is my building based on that version might have baked in a path, and the machine.config hanging around in there interferes with some of my fixes.
If you don't have Mono 4.2.4 installed exactly, this is probably not it... In that case, get me some *.zicrash files please!
Oh, and in any case, this entire script was only built for the Steam version. I've heard it doesn't work with the DRM-free version, but I have no information as to why. *.zicrash files pls.
(If it is the Mono 4.2.4 problem, opening steamapps/common/spacechem/SpaceChem.app/Contents/Resources/SpaceChem.exe.config in a text editor and removing the lines 3 (beginning <configSections>) through to line 13 (</system.net>) should fix the conflict.)
But, really... feed me *.zicrash files please! They live in ~/.local/Zachtronics Industries/SpaceChem/crashes or something like that.

... This is actually probably issue #5. I built the fix wrong 16 days ago and was testing on a non-clean system.

v2.2 fixes this.

authors: daTokenizer leafi

repo: leafi/fix-spacechem-os-x


text:
Android only setup

Is there a way to disable Patrol for iOS but keep using it for Android? I'm asking because I can't build iOS at the moment as the minimum iOS version I am supporting is lower than 13 and moving to 13 isn't immediately possible.

Hi! That's a very good question. Unfortunately, Flutter doesn't allow for removing plugins from one platform. However, I think we could think of a workaround for that from CocoaPods side.
@bartekpacia IIRC you were trying to achieve something similar in the past, what are chances for this workaround?

You might be interested in this workaround.

In addition to not wanting to increase the min iOS version just for testing purposes, I was also having trouble getting the iOS setup to work at all. I'd still like to use Patrol if I could just test my app on Android, but this doesn't seem to be currently possible. I'll probably hold off for now, but if a workaround were described in the official docs I would still consider it.

The minimum iOS restriction is lifted in the newest dev version of patrol, check it out.

Closing because of inactivity + it seems the original issues is solved.

authors: bartekpacia ethnosdev lockieRichter mateuszwojtczak

repo: leancodepl/patrol


text:
[Question] How to handle FieldUndefined exception?

I've managed to create a custom exception handler for any RuntimeException by extending DataFetcherExceptionHandler.
What I don't understand if there is a way to handle FieldUndefined exception, in the same way as RuntimeExceptions?
It seems like this kind of exception ignores my custom DataFetcherExceptionHandler implementation.
The reason why I'm asking is because I only need message and custom property errorType in my response, if something went wrong.
But when this FieldUndefined exception happens, it falls back to the default error response structure, which I don't want.

True. DataFetcherExceptionHandler will only handle the exceptions thrown within the data fetcher, as the name suggests. Validation errors occur before any data fetching happens.
I think the ways for dealing with those are more limited. One would be to register a custom instrumentation and implement beginValidation. In the returned instrumentation context onCompleted can be used to transform the errors.
Alternatively, the whole execution result can be transformed prior to returning by implementing instrumentExecutionResult.
Either way, this is dealing with graphql-java API directly.

Thanks Bojan, I appreciate. :)

repo: leangen/graphql-spqr